The ENV instruction also allows an alternative syntax ENV , omitting the =.
This syntax does not allow for multiple environment-variables to be set in a single ENV instruction, and can be confusing.
The alternative syntax is supported for backward compatibility, but discouraged for the reasons outlined above, and may be removed in a future release.
Recent versions of docker build now issue a warning about the use of the older syntax. Rather than have warnings displayed in our builds, let's switch to the newer syntax.
Testing done
Successfully ran make build and make test on my Linux
Successfully transitioned my personal container definitions to new syntax without issue
Submitter checklist
[x] Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
[x] Ensure that the pull request title represents the desired changelog entry
[x] Please describe what you did
[x] Link to relevant issues in GitHub or Jira
[x] Link to relevant pull requests, esp. upstream and downstream changes
[x] Ensure you have provided tests - that demonstrates feature works or fixes the issue
Use
ENV variable=xxx
instead ofENV variable xxx
The Docker ENV documentation says:
Recent versions of
docker build
now issue a warning about the use of the older syntax. Rather than have warnings displayed in our builds, let's switch to the newer syntax.Testing done
make build
andmake test
on my LinuxSubmitter checklist