Docker Community Forums

Share and learn in the Docker community.

How to get params of docker run in internal of container?

docker

(Nickeyzeng) #1

Generall, we run docker container like this:
docker run -d -p host-ip:port:port --name container-name docker-image

But how to get host-ip in -p param in internal of container?

I want get host-ip in my code running as main progress in container, or could use shell comand to get it?