mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #25775 from ddgenome/entrypoint-env
Remove erroneous ENTRYPOINT note
This commit is contained in:
commit
c1bdda0be8
1 changed files with 9 additions and 2 deletions
|
@ -541,6 +541,9 @@ RUN /bin/bash -c 'source $HOME/.bashrc ; echo $HOME'
|
|||
> `RUN [ "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: `RUN [ "sh", "-c", "echo $HOME" ]`.
|
||||
> When using the exec form and executing a shell directly, as in the case for
|
||||
> the shell form, it is the shell that is doing the environment variable
|
||||
> expansion, not docker.
|
||||
>
|
||||
> **Note**:
|
||||
> In the *JSON* form, it is necessary to escape backslashes. This is
|
||||
|
@ -607,6 +610,9 @@ instruction as well.
|
|||
> `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" ]`.
|
||||
> When using the exec form and executing a shell directly, as in the case for
|
||||
> the shell form, it is the shell that is doing the environment variable
|
||||
> expansion, not docker.
|
||||
|
||||
When used in the shell or exec formats, the `CMD` instruction sets the command
|
||||
to be executed when running the image.
|
||||
|
@ -1075,8 +1081,9 @@ sys 0m 0.03s
|
|||
> `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" ]`.
|
||||
> Variables that are defined in the `Dockerfile`using `ENV`, will be substituted by
|
||||
> the `Dockerfile` parser.
|
||||
> When using the exec form and executing a shell directly, as in the case for
|
||||
> the shell form, it is the shell that is doing the environment variable
|
||||
> expansion, not docker.
|
||||
|
||||
### Shell form ENTRYPOINT example
|
||||
|
||||
|
|
Loading…
Reference in a new issue