Skip to content

Document what are valid characters for a variable in a Dockerfile #1291

Open
@rcjsuen

Description

@rcjsuen

I was routed here from docker/docs#8835...

From cli/docs/reference/builder.md:

Environment variables are notated in the Dockerfile either with $variable_name or ${variable_name}. They are treated equivalently and the brace syntax is typically used to address issues with variable names with no whitespace, like ${foo}_bar.

From my testing, it seems like a variable name includes alphanumeric characters and the underscore...? If this is correct, could this please be mentioned in the Dockerfile reference?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions