-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
dockerfile: allow multiple values for ARG #1692
Conversation
So, if I recall correctly, we didn't do this, because Because of that, the following would be very confusing as they have completely different meanings: # declare three ARGs: ONE, TWO, and THREE
ARG ONE TWO THREE
# define one ENV (ONE) with value "TWO THREE"
ENV ONE TWO THREE So, the ARG ONE=hello
FROM busybox AS stage-foo
# declare three ARGs:
ARG ONE TWO= THREE=world In the example above;
Env vars did get some validation to try to prevent some accidental mistakes; ENV ONE=one TWO two THREE three
But will only produce an error if the first env-var uses an ENV ONE TWO= THREE=world And produce a single env-var ( So not sure what to do with this. I realize My ideal would be to use the same syntax for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leaving a "request changes" review, as this may need some discussion (see my comment)
If you are annoyed about the ambiguity of |
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
e188159
to
c810b8e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussing above, and docker/cli#2741, docker/cli#2743 to reduce confusion, I think it's ok to support this
LGTM
We should probably update the legacy builder as well to support the format? |
I would argue that allowing The whole reason |
Why? The whole Dockerfile language is modeled after shell, and
Where I've seen it, it has always looked like a logical grouping of related values. That is also why having same for |
Podman and older versions of docker do not support multiple args on a single line. It was recently added to docker in this commit moby/buildkit#1692 and podman still dose not have support for it. Signed-off-by: zachaller <zachaller@hotmail.com>
Podman and older versions of docker do not support multiple args on a single line. It was recently added to docker in this commit moby/buildkit#1692 and podman still dose not have support for it. Signed-off-by: zachaller <zachaller@hotmail.com>
Podman and older versions of docker do not support multiple args on a single line. It was recently added to docker in this commit moby/buildkit#1692 and podman still dose not have support for it. Signed-off-by: zachaller <zachaller@hotmail.com> Signed-off-by: wojtekidd <wojtek.cichon@protonmail.com>
ENV
accepts multiple definitions with a single command, no reason whyARG
should behave any differently.Signed-off-by: Tonis Tiigi tonistiigi@gmail.com