Conversation
.. to 'install', 'uninstall' and 'run' commands. This way we can
now do stuff like this:
sudo atomic install -e CONFIG='some value' ...
Or:
sudo CONFIG="some value" atomic install -e CONFIG ...
While INSTALL script can do simply:
'docker run ... -e CONFIG ... SCRIPT'.
So far we could use only --opt2 or 'args' for this to specify
CONFIG for underlying command (running in container). The --opt2,
however, can't be used to specify '--opt2 "-e VAR=\"some val\""',
because resulting ${OPT2} variable is split based on spaces before
used as 'docker run' arguments.
Although specifying CONFIG='some value' via 'args' is treated by
pipes.quote() correctly, it requires additional parsing on the
script side.
|
@hhorak fyi |
|
Can't we just fix the --opt1 parsing to handle this? I really don't want to add additional options, that do the same thing. |
|
On Friday 11 of September 2015 05:30:07 Daniel J Walsh wrote:
Probably yes, but I'm afraid we need to change semantics and do some
I understand your concerns about not adding additional options, but this This sounds like natural complement to 'args' feature, especially with |
|
Except this is hard coding docker commands into the atomic command. What is the expected behaviour of --env when I run a command other then docker in the label INSTALL? I still believe this is the responsibility of your install scripts and not the atomic command. |
|
On Friday 11 of September 2015 05:59:27 Daniel J Walsh wrote:
You meant s/docker commands/docker options/ probably. This proposal is not directly related to docker -- even though I've
The problem is exactly here -- so far I believe the install script was run Except that from the quick look at image/container you are unable to say Other than that, with this PR we are able do something like this: Generate variable or reuse already existing variable in envexport SOME_CONFIG=" |
|
Huh, @github, why the message above is formatted like that ^^. |
|
Not really, Atomic App/Nulecule is already able to do this via parametrization of artifacts. I am also bothered by not being able to pass environment variable through atomic command. So, from my point of view, I'd like to see this added to atomic command, though I wouldn't probably require new argument like |
|
How would we know which environment variables you want to leak? We don't want to leak the entire environment into the container. If I had label INSTALL "docker run ${IMAGE} /usr/bin/install.sh" What would you expect to be executed? |
|
I'd more expect something like atomic finds all env variables in RUN label and then passes them to the process |
|
On Friday 11 of September 2015 07:45:26 Vaclav Pavlin wrote:
This is actually not happening within atomic itself, but it is done in But yes, if we can leak whole environment into the INSTALL command from |
|
I don't follow. If I want to be sure I deal with white spaces properly isn't it enough to specify label as and the atomic run then as I haven't tried it, but I'd expect the whole string |
|
On Friday 11 of September 2015 07:54:51 Vaclav Pavlin wrote:
+1, just wanted to underline the fact that it is not done by atomic
Correct. |
|
How about you try this patch, is this what you want? |
|
I like this as it make the things more transparent (at least for me). For example in atomic app we call |
|
On Friday 11 of September 2015 08:11:01 Daniel J Walsh wrote:
Yes, +1, this is OK. |
|
Since passing the host environment got merged, closing this one. |
.. to 'install', 'uninstall' and 'run' commands. This way we can
now do stuff like this:
Or:
While INSTALL script can do simply:
So far we could use only --opt2 or 'args' for this to specify
CONFIG for underlying command (running in container). The --opt2,
however, can't be used to specify '--opt2 "-e VAR="some val""',
because resulting ${OPT2} variable is split based on spaces before
used as 'docker run' arguments.
Although specifying CONFIG='some value' via 'args' is treated by
pipes.quote() correctly, it requires additional parsing on the
script side.