瀏覽代碼

Add notes about single-quotes

Signed-off-by: Doug Davis <dug@us.ibm.com>
Doug Davis 10 年之前
父節點
當前提交
b47a2fbdc5
共有 1 個文件被更改,包括 16 次插入0 次删除
  1. 16 0
      docs/sources/reference/builder.md

+ 16 - 0
docs/sources/reference/builder.md

@@ -182,6 +182,10 @@ commands using a base image that does not contain `/bin/sh`.
 > passing in the desired shell. For example,
 > `RUN ["/bin/bash", "-c", "echo hello"]`
 
+> **Note**:
+> The *exec* form is parsed as a JSON array, which means that
+> you must use double-quotes (") around words not single-quotes (').
+
 The cache for `RUN` instructions isn't invalidated automatically during
 the next build. The cache for an instruction like `RUN apt-get
 dist-upgrade -y` will be reused during the next build.  The cache for
@@ -219,6 +223,10 @@ instruction as well.
 > instruction, both the `CMD` and `ENTRYPOINT` instructions should be specified 
 > with the JSON array format.
 
+> **Note**:
+> The *exec* form is parsed as a JSON array, which means that
+> you must use double-quotes (") around words not single-quotes (').
+
 When used in the shell or exec formats, the `CMD` instruction sets the command
 to be executed when running the image.
 
@@ -434,6 +442,10 @@ optional but default, you could use a `CMD` instruction:
     CMD ["-l"]
     ENTRYPOINT ["ls"]
 
+> **Note**:
+> The *exec* form is parsed as a JSON array, which means that
+> you must use double-quotes (") around words not single-quotes (').
+
 > **Note**:
 > It is preferable to use the JSON array format for specifying
 > `ENTRYPOINT` instructions.
@@ -449,6 +461,10 @@ string, `VOLUME /var/log`. For more information/examples and mounting
 instructions via the Docker client, refer to [*Share Directories via Volumes*](
 /userguide/dockervolumes/#volume-def) documentation.
 
+> **Note**:
+> The list is parsed a JSON array, which means that
+> you must use double-quotes (") around words not single-quotes (').
+
 ## USER
 
     USER daemon