docker-gen
docker-gen copied to clipboard
Allow only internal networks
Hello,
I'd like to have some containers exposed only to internal networks as explained in jwilder/nginx-proxy docs but since I am using separate containers in my setup - official nginx and docker-gen images - I'm not sure how to do exactly the same. Should I edit the nginx.tmpl or am I missing some existing options?
Thanks!
@kaosmonk as I understand, it is already done. I use almost official nginx.tmpl (with one important fix for many networks) and official nginx and docker-gen docker images. My APIs inside one virtual network with nginx, but it is internal docker network.
@kaosmonk just noticed this open issue. To make NETWORK_ACCESS=internal on docker-gen do the following:
Manually mount network_internal.conf in /etc/nginx/network_internal.conf and use the nginx-proxy from https://github.com/jwilder/nginx-proxy
I have opened https://github.com/jwilder/docker-gen/issues/278 to see if some good soul can fix the Dockerfile
Thanks a lot!
Jus for the records, with official nginx image it works as expected, mounting:
-v /path/to/network_internal.conf:/etc/nginx/network_internal.conf
I tested it with 3 containers (official nginx, nginx-gen and nginx-letsencryptcompanion)
I had a similar use case: I needed to proxy containers which are only connected to an internal network (to deny egress traffic), therefore they cannot expose ports and require some template configuration to be proxiable. I described the issue and my solution in the google group: https://groups.google.com/forum/#!topic/nginx-proxy/YL5GypqStOA
This repo should no longer handle issues or discussions related to nginx-proxy / the nginx-proxy template, unless there is something we need to change / fix in docker-gen in order to allow a change / fix in nginx-proxy.