[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [atomic-devel] Using docker run -ti for interactive INSTALL?





On 03/09/2016 06:03 AM, Jan Pazdziora wrote:
On Thu, Mar 03, 2016 at 11:54:45AM -0500, Daniel J Walsh wrote:

On 03/03/2016 11:30 AM, Jan Pazdziora wrote:
On Thu, Mar 03, 2016 at 11:22:52AM -0500, Daniel J Walsh wrote:
On 03/03/2016 11:14 AM, Jan Pazdziora wrote:
It's a pity LABELs don't seem to accept / preserve array values --

	[ 'docker', 'run', 'arg with space' ]

could be used to distinguish situation when shell should not be used.
Patches accepted.  :^)
But these would be for docker, right?
No atomic.
When I use Dockerfile with

	LABEL INSTALL [ 'docker', 'run', '--rm', '${NAME}', '/bin/test.sh', 'install', 'test install with space, as well as comma' ]
	LABEL RUN 'docker run --rm ${NAME} /bin/test.sh run test run'
	CMD [ "/bin/test.sh", "cmd", "cmd with space" ]

the docker inspect on the image says

     "ContainerConfig": {
         ...
         "Cmd": [
             "/bin/sh",
             "-c",
             "#(nop) CMD [\"/bin/test.sh\" \"cmd\" \"cmd with space\"]"
         ],
         ...
         "Labels": {
             "INSTALL": "[ docker, run, --rm, ${NAME}, /bin/test.sh, install, test install with space, as well as comma ]",
             "RUN": "docker run --rm ${NAME} /bin/test.sh run test run"
         }
     },
     ...
     "Config": {
         ...
         "Cmd": [
             "/bin/test.sh",
             "cmd",
             "cmd with space"
         ],
         ...
         "Labels": {
             "INSTALL": "[ docker, run, --rm, ${NAME}, /bin/test.sh, install, test install with space, as well as comma ]",
             "RUN": "docker run --rm ${NAME} /bin/test.sh run test run"
         }
     },

That seems to indicate it's docker itself that parses the array syntax
into string, not atomic.

While we might try to do some magic based on the string starting with
"[", it seems impossible to parse it back and recreate the information
that was lost when it was stringified.

Or am I missing something about getting at the original LABEL value?

How about

from fedora
LABEL INSTALL [ 'docker', 'run', '--rm', '${NAME}', '/bin/test.sh', 'install', '"test install with space, as well as comma"' ]
LABEL RUN 'docker run --rm ${NAME} /bin/test.sh run test run'
CMD [ "/bin/test.sh", "cmd", "cmd with space" ]







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]