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

ENV syntax ENV <key>=<value> barely documented #2273

Open
adelton opened this issue Dec 12, 2024 · 0 comments
Open

ENV syntax ENV <key>=<value> barely documented #2273

adelton opened this issue Dec 12, 2024 · 0 comments

Comments

@adelton
Copy link

adelton commented Dec 12, 2024

The https://github.com/containers/common/blob/main/docs/Containerfile.5.md says

ENV -- ENV <key> <value> The ENV instruction sets the environment variable to the value <value>.

So it only shows the syntax of key and value separated by space.

But the next paragraph says

Note that setting "ENV DEBIAN_FRONTEND=noninteractive" may ...

so it suddenly suggests that the format with the = sign also works.

I've now tested with podman-5.3.0-1.fc41.x86_64 that the syntax ENV a=b c=d with multiple assignments also works.

The https://docs.docker.com/reference/dockerfile/#env actually shows the ENV <key>=<value> as the preferred format and calls the ENV <key> <value> syntax an alternative one.

If the syntax with = and with support of multiple variables being set is actually supported by the software out there and expected to be supported, should https://github.com/containers/common/blob/main/docs/Containerfile.5.md be amended to at least show it as being a first-class citizen, if not the preferred one?

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

No branches or pull requests

1 participant