Docker Community Forums

Share and learn in the Docker community.

Docker Link Env Settings Missing


(Mike Wiegand) #1

Disclaimer: I am on week 2 of Docker use. I have 2 containers, one is a website, the other is a set of web services. I use the following commands to link them together:

docker run -t -d --name webapi mw/dockerservices2
docker run -t -d -p 80:80 --name web --link webapi:webapi mw/dockermvc4

I have not been able to see the env settings which link provides in the web container. I have tried:
docker --tls exec -it web bash and I get the following results:

root@ecbaa70641d6:/app/approot/src/DockerMvc# env
HOSTNAME=ecbaa70641d6
TERM=xterm
WEBAPI_NAME=/web/webapi
WEBAPI_ENV_DNX_USER_HOME=/opt/dnx
DNX_VERSION=1.0.0-beta4
PATH=/opt/dnx/runtimes/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/app/approot/src/DockerMvc
SHLVL=1
HOME=/root
WEBAPI_ENV_DNX_VERSION=1.0.0-beta4
DNX_USER_HOME=/opt/dnx_=/usr/bin/env

webapi does not expose any ports and the intention was to internally link using the env or /etc/hosts entries. What am I doing wrong here? I see WEBAPI entries above but I want to do an Http Get to the webapi container. Any help on viewing these link settings or anything at all is greatly appreciated.