mirror of https://github.com/docker/docs.git
Merge pull request #7998 from duglin/Issue5701
Add notes about single-quotes (for issue 5701)
This commit is contained in:
commit
b6b85a58fd
|
@ -182,6 +182,10 @@ commands using a base image that does not contain `/bin/sh`.
|
||||||
> passing in the desired shell. For example,
|
> passing in the desired shell. For example,
|
||||||
> `RUN ["/bin/bash", "-c", "echo hello"]`
|
> `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 cache for `RUN` instructions isn't invalidated automatically during
|
||||||
the next build. The cache for an instruction like `RUN apt-get
|
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
|
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
|
> instruction, both the `CMD` and `ENTRYPOINT` instructions should be specified
|
||||||
> with the JSON array format.
|
> 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
|
When used in the shell or exec formats, the `CMD` instruction sets the command
|
||||||
to be executed when running the image.
|
to be executed when running the image.
|
||||||
|
|
||||||
|
@ -434,6 +442,10 @@ optional but default, you could use a `CMD` instruction:
|
||||||
CMD ["-l"]
|
CMD ["-l"]
|
||||||
ENTRYPOINT ["ls"]
|
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**:
|
> **Note**:
|
||||||
> It is preferable to use the JSON array format for specifying
|
> It is preferable to use the JSON array format for specifying
|
||||||
> `ENTRYPOINT` instructions.
|
> `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*](
|
instructions via the Docker client, refer to [*Share Directories via Volumes*](
|
||||||
/userguide/dockervolumes/#volume-def) documentation.
|
/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
|
||||||
|
|
||||||
USER daemon
|
USER daemon
|
||||||
|
|
Loading…
Reference in New Issue