Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ARG sytnax definition in dockerfile reference #5427

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

thompson-shaun
Copy link
Collaborator

Small update to the ARG syntax definition in the reference document. It should now reflect the ability to have multiple ARGs declared on a single line.

Signed-off-by: Shaun Thompson <shaun.thompson@docker.com>
@tonistiigi tonistiigi merged commit 4b4a9aa into moby:master Oct 15, 2024
31 checks passed
@@ -2310,7 +2310,7 @@ Therefore, to avoid unintended operations in unknown directories, it's best prac
## ARG

```dockerfile
ARG <name>[=<default value>]
ARG <name>[=<default value>] ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if the more correct presentation of this would be (more clearly indicating that the first key/value is required, and more are optional);

Suggested change
ARG <name>[=<default value>] ...
ARG <name>[=<default value>] [<name>[=<default value>]...]

Similar to how (e.g.) we do for docker stop and docker service scale;

docker stop --help

Usage:  docker stop [OPTIONS] CONTAINER [CONTAINER...]
docker service scale --help

Usage:  docker service scale SERVICE=REPLICAS [SERVICE=REPLICAS...]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh! Too late, just merged 😂

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess your suggestion is more correct but this was also the variant used in ENV and LABEL. So modifications should be done together then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants