Merge pull request #6386 from cpuguy83/fix_link_docs
Adds info on how to get env vars from container
This commit is contained in:
commit
c40602b254
|
@ -171,14 +171,11 @@ child container in two ways:
|
|||
* Environment variables,
|
||||
* Updating the `/etc/host` file.
|
||||
|
||||
Let's look first at the environment variables Docker sets. Inside the `web`
|
||||
container let's run the `env` command to list the container's environment
|
||||
variables.
|
||||
|
||||
root@aed84ee21bde:/opt/webapp# env
|
||||
HOSTNAME=aed84ee21bde
|
||||
Let's look first at the environment variables Docker sets. Let's run the `env`
|
||||
command to list the container's environment variables.
|
||||
$docker run --rm --link --name web2 db:db training/webapp env
|
||||
. . .
|
||||
DB_NAME=/web/db
|
||||
DB_NAME=/web2/db
|
||||
DB_PORT=tcp://172.17.0.5:5432
|
||||
DB_PORT_5000_TCP=tcp://172.17.0.5:5432
|
||||
DB_PORT_5000_TCP_PROTO=tcp
|
||||
|
|
Loading…
Reference in New Issue