mgranger Posted February 21, 2019 Share Posted February 21, 2019 (edited) Sorry if this is a simple question but I have a docker that I want to connect to two different networks. Is there a way to do this and if there is how would I do it. Currently I have 2 different Ethernet ports and for example one is running on 192.168.1.x and the other is on 192.168.2.x. Is there a way to get the container to be able to recognize devices on both networks? Currently I have the first network recognized but unsure how to get the other one. Edited February 21, 2019 by mgranger Quote Link to comment
MrMoosieMan Posted February 21, 2019 Share Posted February 21, 2019 I see no way of doing this. I would think you would spin up another instance of the Docker container for the 2nd network. I have a few instances of Plex running on different networks using this method. Quote Link to comment
mgranger Posted February 22, 2019 Author Share Posted February 22, 2019 seriously there is nothing that would allow me to access the 2nd network Quote Link to comment
bonienl Posted February 22, 2019 Share Posted February 22, 2019 2 hours ago, mgranger said: seriously there is nothing that would allow me to access the 2nd network This is only possible thru CLI. Use this command docker network connect <network> <container> Quote Link to comment
mgranger Posted February 23, 2019 Author Share Posted February 23, 2019 On 2/22/2019 at 2:00 AM, bonienl said: docker network connect <network> <container> this is what i am getting when i run this root@Finalizer:~# docker network connect eth3 home-assistant Error response from daemon: network eth3 not found Quote Link to comment
bonienl Posted February 24, 2019 Share Posted February 24, 2019 what is the output of docker network ls Networks are defined under Settings -> Docker Or you can create your own user defined networks, make sure the setting "Preserve user defined networks = Yes" 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.