Docker Community Forums

Share and learn in the Docker community.

How to publish a host port to the container?

I know how to publish container ports to the host using the -p option of docker container run. What I want to do is the reverse of that operation, i.e. publish host ports to the container.

The host is behind an NTLM proxy, and so I’ve installed Cntlm on the host, listening on localhost:3128. Now, I don’t want to install and configure Cntlm on every single container; instead I want to make the Cntlm listening socket available in the containers.

How can this be accomplished?