@SvenDowideit FYI
Closes #3087
Signed-off-by: Doug Davis <dug@us.ibm.com>
| ... | ... |
@@ -428,9 +428,48 @@ client container to help indicate which interface and port to use. |
| 428 | 428 |
|
| 429 | 429 |
## ENV (Environment Variables) |
| 430 | 430 |
|
| 431 |
-The operator can **set any environment variable** in the container by |
|
| 432 |
-using one or more `-e` flags, even overriding those already defined by |
|
| 433 |
-the developer with a Dockerfile `ENV`: |
|
| 431 |
+When a new container is created, Docker will set the following environment |
|
| 432 |
+variables automatically: |
|
| 433 |
+ |
|
| 434 |
+<table width=100%> |
|
| 435 |
+ <tr style="background-color:#C0C0C0"> |
|
| 436 |
+ <td> <b>Variable</b> </td> |
|
| 437 |
+ <td style="padding-left:10px"> <b>Value</b> </td> |
|
| 438 |
+ </tr> |
|
| 439 |
+ <tr> |
|
| 440 |
+ <td> <code>HOME</code> </td> |
|
| 441 |
+ <td style="padding-left:10px"> |
|
| 442 |
+ Set based on the value of <code>USER</code> |
|
| 443 |
+ </td> |
|
| 444 |
+ </tr> |
|
| 445 |
+ <tr style="background-color:#E8E8E8"> |
|
| 446 |
+ <td valign=top> <code>HOSTNAME</code> </td> |
|
| 447 |
+ <td style="padding-left:10px"> |
|
| 448 |
+ The hostname associated with the container |
|
| 449 |
+ </td> |
|
| 450 |
+ </tr> |
|
| 451 |
+ <tr> |
|
| 452 |
+ <td valign=top> <code>PATH</code> </td> |
|
| 453 |
+ <td style="padding-left:10px"> |
|
| 454 |
+ Includes popular directories, such as :<br> |
|
| 455 |
+ <code>/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin</code> |
|
| 456 |
+ </td> |
|
| 457 |
+ <tr style="background-color:#E8E8E8"> |
|
| 458 |
+ <td valign=top> <code>TERM</code> </td> |
|
| 459 |
+ <td style="padding-left:10px"> |
|
| 460 |
+ <code>xterm</code> if the container is allocated a psuedo-TTY |
|
| 461 |
+ </td> |
|
| 462 |
+ </tr> |
|
| 463 |
+</table> |
|
| 464 |
+ |
|
| 465 |
+The container may also include environment variables defined |
|
| 466 |
+as a result of the container being linked with another container. See |
|
| 467 |
+the [*Container Links*](/userguide/dockerlinks/#container-linking) |
|
| 468 |
+section for more details. |
|
| 469 |
+ |
|
| 470 |
+Additionally, the operator can **set any environment variable** in the |
|
| 471 |
+container by using one or more `-e` flags, even overriding those mentioned |
|
| 472 |
+above, or already defined by the developer with a Dockerfile `ENV`: |
|
| 434 | 473 |
|
| 435 | 474 |
$ sudo docker run -e "deep=purple" --rm ubuntu /bin/bash -c export |
| 436 | 475 |
declare -x HOME="/" |