Document what are valid characters for a variable in a Dockerfile
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 682
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 29
Description
I was routed here from https://github.com/docker/docker.github.io/issues/8835...
From cli/docs/reference/builder.md:
Environment variables are notated in the
Dockerfileeither with$variable_nameor${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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the variable-substitution section in cli/docs/reference/builder.md, especially the wording around $variable_name and ${variable_name}. Confirm which characters are valid in variable names, then document that rule in the Dockerfile reference so users can determine valid syntax without testing it themselves.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100