jenkinsci / docker

Docker official jenkins repo
https://hub.docker.com/r/jenkins/jenkins
MIT License
6.55k stars 4.47k forks source link

Use 'ENV variable=xxx' instead of 'ENV variable xxx' #1900

Closed MarkEWaite closed 1 week ago

MarkEWaite commented 1 week ago

Use ENV variable=xxx instead of ENV variable xxx

The Docker ENV documentation says:

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

Submitter checklist