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

Proposal: expand dockerfile command "ENV" to be able to unset environment variables #11922

Closed
liusdu opened this issue Mar 30, 2015 · 4 comments
Labels
area/builder kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.

Comments

@liusdu
Copy link
Contributor

liusdu commented Mar 30, 2015

problem on unsetting environment variables

In Dockerfile, we use "ENV" command to export environment variables. But we can not unset variables. While in linux shell we can do that using "export -n" or "unset". It is very inconvenient. Think about below:

  • variables while useful duiring image-building but useless when finishing. (such as https_proxy). So I think we need this improvement.
  • number of en variables can only grow

RFC thoughts to solve this.

Allow ENV to allow one argument. Look at these cases:

  • ENV VAR 1 #set VAR to 1
  • ENV VAR #unset VAR
  • ENV VAR=1 #set VAR to 1
  • ENV VAR= #unset VAR

RFC patches you can see here ##11921

Lable

We can expend lable command just as what ENV does.

@liusdu liusdu changed the title Proposal: expend dockerfile command "ENV" to be able to unset environment variables Proposal: expand dockerfile command "ENV" to be able to unset environment variables Mar 30, 2015
@thaJeztah
Copy link
Member

I think this is a dup of #3465, which is implemented in #8177

Unfortunately it didn't make it in the 1.6 release, but is scheduled for docker 1.7

@erikh
Copy link
Contributor

erikh commented Mar 30, 2015

Yes, I prefer this approach over the proposed one here. Sorry.

-Erik

On Mar 30, 2015, at 2:31 AM, Sebastiaan van Stijn notifications@github.com wrote:

I think this is a dup of #3465 #3465, which is implemented in #8177 #8177
Unfortunately it didn't make it in the 1.6 release, but is scheduled for docker 1.7


Reply to this email directly or view it on GitHub #11922 (comment).

@liusdu
Copy link
Contributor Author

liusdu commented Mar 30, 2015

Yes, I have not seen it . I will cose this issue

@liusdu liusdu closed this as completed Mar 30, 2015
@thaJeztah
Copy link
Member

@liusdu thanks! Thanks you for your contribution (even though it won't be merged). I fully agree that something like this is needed, so hope that #8177 will be merged soon.

Please don't let this stop you from contributing to the project; it is really appreciated!

@thaJeztah thaJeztah added area/builder kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. labels Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/builder kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.
Projects
None yet
Development

No branches or pull requests

3 participants