Skip to content
This repository was archived by the owner on Jul 20, 2026. It is now read-only.

Use ENV key=value in Dockerfile templates - #2344

Merged
bwateratmsft merged 1 commit into
microsoft:masterfrom
StefanScherer:update-dockerfile-env
Sep 23, 2020
Merged

Use ENV key=value in Dockerfile templates#2344
bwateratmsft merged 1 commit into
microsoft:masterfrom
StefanScherer:update-dockerfile-env

Conversation

@StefanScherer

Copy link
Copy Markdown
Contributor

Hi,
In our docs.docker.com we've removed the examples that used the old syntax ENV key value and replaced it with the better ENV key=value syntax (related docker/docs#11414).
The old style had its problems when using multiple environment variables ENV ONE TWO= THREE=world

Just yesterday I used the Docker extension in preparation for a Docker beginners video course and saw that the Docker extension uses the old style.

This PR changes the templates to the new style and helps users to use the good practice.

Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
@StefanScherer
StefanScherer requested a review from a team as a code owner September 23, 2020 14:15

@bwateratmsft bwateratmsft left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me, thanks @StefanScherer!

@thaJeztah

thaJeztah commented Sep 23, 2020

Copy link
Copy Markdown

Thanks! FWIW (for people arriving here); both syntaxes will continue to be supported, but the syntax without = can be somewhat ambiguous, and it's easy to make mistakes with that format, so we're trying to discourage its use. (more background in moby/buildkit#1692 (comment))

@bwateratmsft
bwateratmsft merged commit a5b817a into microsoft:master Sep 23, 2020
@StefanScherer
StefanScherer deleted the update-dockerfile-env branch September 23, 2020 14:34
Dmarch28 pushed a commit to Dmarch28/vscode-docker that referenced this pull request Mar 4, 2021
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
@microsoft microsoft locked and limited conversation to collaborators Oct 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants