mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #23760 from SerhatG/docker_doc_cmd_shell_comment
Docker reference error CMD with ENV variables
This commit is contained in:
commit
86d5c7e759
1 changed files with 2 additions and 2 deletions
|
@ -606,7 +606,7 @@ instruction as well.
|
|||
> This means that normal shell processing does not happen. For example,
|
||||
> `CMD [ "echo", "$HOME" ]` will not do variable substitution on `$HOME`.
|
||||
> If you want shell processing then either use the *shell* form or execute
|
||||
> a shell directly, for example: `CMD [ "sh", "-c", "echo", "$HOME" ]`.
|
||||
> a shell directly, for example: `CMD [ "sh", "-c", "echo $HOME" ]`.
|
||||
|
||||
When used in the shell or exec formats, the `CMD` instruction sets the command
|
||||
to be executed when running the image.
|
||||
|
@ -1074,7 +1074,7 @@ sys 0m 0.03s
|
|||
> This means that normal shell processing does not happen. For example,
|
||||
> `ENTRYPOINT [ "echo", "$HOME" ]` will not do variable substitution on `$HOME`.
|
||||
> If you want shell processing then either use the *shell* form or execute
|
||||
> a shell directly, for example: `ENTRYPOINT [ "sh", "-c", "echo", "$HOME" ]`.
|
||||
> a shell directly, for example: `ENTRYPOINT [ "sh", "-c", "echo $HOME" ]`.
|
||||
> Variables that are defined in the `Dockerfile`using `ENV`, will be substituted by
|
||||
> the `Dockerfile` parser.
|
||||
|
||||
|
|
Loading…
Reference in a new issue