I have the Docker mechanism installed on Debian Jessie, and I run a container with nginx there. My run command looks like this:
docker run -p 1234:80 -d -v /var/www/:/usr/share/nginx/html nginx:1.9
It works fine, the problem is that the contents of this container are now accessible via http://{server_ip}:1234 . I want to run several containers (domains) on this server, so I want to configure reverse proxies for them.
How can I make sure that the container will be accessible only through the reverse proxy, and not directly from IP:port ? For instance:.
http://{server_ip}:1234
// EDIT: Just to be clear - I am not asking how to configure the reverse proxy, but how to start the Docker container to access only from the local host.
source share