I am using the nginx-proxy
image (https://github.com/jwilder/nginx-proxy) to automatically configure nginx proxy in front of my services. The corresponding nginx-proxy
container is running in the nginx-proxy
network:
docker network create nginx-proxy
docker run -d -p 80:80 --network nginx-proxy -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
Now I have several containers which need to be proxied by nginx. To make this work, I need to attach all services to the nginx-proxy
network. This is required for nginx-proxy
to access the containers.
But now, all containers can communicate with eachother via this nginx-proxy
network. This is not desired and possibly unsafe. This breaks the principle of isolation.
Is there a way to prevent this?