Browse code

We had some testers who found a hard to diagnose bug in Dockerfile

They used single-quotes (') in the exec-form of onbuild run command
and things blew up. They asked to fix the man page to explain why.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)

Dan Walsh authored on 2015/03/06 22:41:41
Showing 1 changed files
... ...
@@ -97,6 +97,9 @@ A Dockerfile is similar to a Makefile.
97 97
   exec form makes it possible to avoid shell string munging. The exec form makes
98 98
   it possible to **RUN** commands using a base image that does not contain `/bin/sh`.
99 99
 
100
+  Note that the exec form is parsed as a JSON array, which means that you must
101
+  use double-quotes (") around words not single-quotes (').
102
+
100 103
 **CMD**
101 104
   -- **CMD** has three forms:
102 105
 
... ...
@@ -120,6 +123,9 @@ A Dockerfile is similar to a Makefile.
120 120
   be executed when running the image.
121 121
   If you use the shell form of the **CMD**, the `<command>` executes in `/bin/sh -c`:
122 122
 
123
+  Note that the exec form is parsed as a JSON array, which means that you must
124
+  use double-quotes (") around words not single-quotes (').
125
+
123 126
   ```
124 127
   FROM ubuntu
125 128
   CMD echo "This is a test." | wc -