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

Use ENV key=value in Dockerfile templates #2344

Merged
merged 1 commit into from
Sep 23, 2020

Conversation

StefanScherer
Copy link
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
Copy link
Collaborator

@bwateratmsft bwateratmsft left a comment

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
Copy link

thaJeztah commented Sep 23, 2020

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