August 25, 20178 yr Hello, I am trying to set docker (and all docker containers) to use a specific gateway on my network (Unraid uses dhcp gateway, 192.168.1.1, want containers to use a different, non dhcp gateway, same subnet though). From the information I have found (https://docs.docker.com/v1.7/articles/networking/)it seems the way to do this is to start docker with the command line option "--default-gateway=IP_ADDRESS" I edited /boot/config/docker.cfg and added: DOCKER_OPTS="--default-gateway=192.168.1.254" However, docker will not start when that it added, when I remove it docker starts as normal. Does anyone know what I am doing wrong or if there is another way to achieve what I am doing that survives reboots and can be easily reverted if needed? Would be great to be able to set the gateway only on specific containers but afaik there is no way to do that without multiple docker bridges and that seems a much more complicated solution, if it's even viable.
October 19, 20178 yr I would like to know this too. A seperate gateway for each docker container would be awesome!
October 19, 20178 yr I think this is what you are looking for- https://forums.lime-technology.com/topic/54882-630-how-to-setup-dockers-without-sharing-unraid-ip-address/ 6.4 RC builds allow this to be setup in the webUI.
Archived
This topic is now archived and is closed to further replies.