Iormangund Posted August 25, 2017 Share Posted August 25, 2017 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. Quote Link to comment
Leandres Posted October 19, 2017 Share Posted October 19, 2017 I would like to know this too. A seperate gateway for each docker container would be awesome! Quote Link to comment
wgstarks Posted October 19, 2017 Share Posted October 19, 2017 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.