mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add notes about single-quotes
Signed-off-by: Doug Davis <dug@us.ibm.com>
This commit is contained in:
parent
2d1c8bd786
commit
b47a2fbdc5
1 changed files with 16 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue