Add sentece to RUN, CMD, and ENTRYPOINT exec sections making it clear
that it is the shell doing the environment variable expansion.
Signed-off-by: David Dooling <dooling@gmail.com>
| ... | ... |
@@ -541,6 +541,9 @@ RUN /bin/bash -c 'source $HOME/.bashrc ; echo $HOME' |
| 541 | 541 |
> `RUN [ "echo", "$HOME" ]` will not do variable substitution on `$HOME`. |
| 542 | 542 |
> If you want shell processing then either use the *shell* form or execute |
| 543 | 543 |
> a shell directly, for example: `RUN [ "sh", "-c", "echo $HOME" ]`. |
| 544 |
+> When using the exec form and executing a shell directly, as in the case for |
|
| 545 |
+> the shell form, it is the shell that is doing the environment variable |
|
| 546 |
+> expansion, not docker. |
|
| 544 | 547 |
> |
| 545 | 548 |
> **Note**: |
| 546 | 549 |
> In the *JSON* form, it is necessary to escape backslashes. This is |
| ... | ... |
@@ -607,6 +610,9 @@ instruction as well. |
| 607 | 607 |
> `CMD [ "echo", "$HOME" ]` will not do variable substitution on `$HOME`. |
| 608 | 608 |
> If you want shell processing then either use the *shell* form or execute |
| 609 | 609 |
> a shell directly, for example: `CMD [ "sh", "-c", "echo $HOME" ]`. |
| 610 |
+> When using the exec form and executing a shell directly, as in the case for |
|
| 611 |
+> the shell form, it is the shell that is doing the environment variable |
|
| 612 |
+> expansion, not docker. |
|
| 610 | 613 |
|
| 611 | 614 |
When used in the shell or exec formats, the `CMD` instruction sets the command |
| 612 | 615 |
to be executed when running the image. |
| ... | ... |
@@ -1075,6 +1081,9 @@ sys 0m 0.03s |
| 1075 | 1075 |
> `ENTRYPOINT [ "echo", "$HOME" ]` will not do variable substitution on `$HOME`. |
| 1076 | 1076 |
> If you want shell processing then either use the *shell* form or execute |
| 1077 | 1077 |
> a shell directly, for example: `ENTRYPOINT [ "sh", "-c", "echo $HOME" ]`. |
| 1078 |
+> When using the exec form and executing a shell directly, as in the case for |
|
| 1079 |
+> the shell form, it is the shell that is doing the environment variable |
|
| 1080 |
+> expansion, not docker. |
|
| 1078 | 1081 |
|
| 1079 | 1082 |
### Shell form ENTRYPOINT example |
| 1080 | 1083 |
|