-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Allow ENV to set multiple variables in one layer #2333
Comments
Marking as easyfix. |
I will work on it |
I think this is a good idea. We do the same for EXPOSE and VOLUMES so I think ENV will be fine as well |
This would be awesome. It is really pity #3368 got closed. |
@mikz That PR was closed but we proposed a format that would be accepted. |
@crosbymichael but the parser for that syntax it not yet implemented, right? |
Not that I know of but it would be easy to implement for this PR. |
@crosbymichael what are the requirements for this to make it to 1.0? |
Is it related to #332? |
We're investigating implementing this with the changes introduced by #7461, is anyone else looking at it? The syntax that @shykes mentioned was:
Is anyone opposed to that? |
@lox I would prefer to just make ENV (and other consecutive nop commands) happen in one commit. But IANTM |
Is there an issue related to specifically that issue @cpuguy83? I agree that would be a more worthy objective. |
+1 I was thinking about exactly this today; now that we have a proper |
@lox the syntax looks much cleaner 👍 On the "special chars" part, what characters would be forbidden (besides |
Yup. :) The parser is completely independent of the evaluator, so there could be an optimizer step in between or something similar if we wanted. On Sep 16, 2014, at 7:29 PM, Tianon Gravi notifications@github.com wrote:
|
still supports the old form: ENV name value Also, fixed an issue with the parser where it would ignore lines at the end of the Dockerfile that ended with \ Closes moby#2333 Signed-off-by: Doug Davis <dug@us.ibm.com>
still supports the old form: ENV name value Also, fixed an issue with the parser where it would ignore lines at the end of the Dockerfile that ended with \ Closes moby#2333 Signed-off-by: Doug Davis <dug@us.ibm.com>
Could someone tell since which Docker version should have this feature? |
1.4 |
Thanks for quick answer! 👍 |
Currently each ENV command sets one variable and results in one layer.
Due the limitation of AUFS to 48 layers, it would be very helpful to allow ENV to set multiple variables at once.
Maybe like an array ENV ["key1=value1", "key2"=value2"]
The text was updated successfully, but these errors were encountered: