From b3769f0ca6f70303e7fa4a3ec1cc47bab91de34b Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Fri, 6 Mar 2015 08:41:41 -0500 Subject: [PATCH] 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 (github: rhatdan) --- docs/man/Dockerfile.5.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/man/Dockerfile.5.md b/docs/man/Dockerfile.5.md index d66bcad067..51e1390ceb 100644 --- a/docs/man/Dockerfile.5.md +++ b/docs/man/Dockerfile.5.md @@ -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 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** has three forms: @@ -120,6 +123,9 @@ A Dockerfile is similar to a Makefile. be executed when running the image. If you use the shell form of the **CMD**, the `` 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 CMD echo "This is a test." | wc -