1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #11203 from rhatdan/Dockerfile

We had some testers who found a hard to diagnose bug in Dockerfile
This commit is contained in:
Jessie Frazelle 2015-03-16 17:26:18 -07:00
commit f4f10cf43b

View file

@ -97,6 +97,9 @@ A Dockerfile is similar to a Makefile.
exec form makes it possible to avoid shell string munging. The exec form makes exec form makes it possible to avoid shell string munging. The exec form makes
it possible to **RUN** commands using a base image that does not contain `/bin/sh`. it possible to **RUN** commands using a base image that does not contain `/bin/sh`.
Note that the exec form is parsed as a JSON array, which means that you must
use double-quotes (") around words not single-quotes (').
**CMD** **CMD**
-- **CMD** has three forms: -- **CMD** has three forms:
@ -120,6 +123,9 @@ A Dockerfile is similar to a Makefile.
be executed when running the image. be executed when running the image.
If you use the shell form of the **CMD**, the `<command>` executes in `/bin/sh -c`: If you use the shell form of the **CMD**, the `<command>` executes in `/bin/sh -c`:
Note that the exec form is parsed as a JSON array, which means that you must
use double-quotes (") around words not single-quotes (').
``` ```
FROM ubuntu FROM ubuntu
CMD echo "This is a test." | wc - CMD echo "This is a test." | wc -