June 5, 20179 yr I'm not clear on the IP address assignment to a docker. I want to assign the static IP address 192.168.1.8 to my ownCloud docker. How do I go about doing that? How does the docker pick up that IP address?
June 5, 20179 yr 5 minutes ago, dlandon said: I'm not clear on the IP address assignment to a docker. I want to assign the static IP address 192.168.1.8 to my ownCloud docker. How do I go about doing that? How does the docker pick up that IP address? Change Network Type of a container to a custom network, e.g. eth0 or br0 A new field Fixed IP address (optional) appears and allows you to assign a fixed address
June 5, 20179 yr Author 32 minutes ago, bonienl said: Change Network Type of a container to a custom network, e.g. eth0 or br0 A new field Fixed IP address (optional) appears and allows you to assign a fixed address Now that is slick!
June 5, 20179 yr 1 hour ago, bonienl said: Change Network Type of a container to a custom network, e.g. eth0 or br0 A new field Fixed IP address (optional) appears and allows you to assign a fixed address I don't get this option. Only "None", "Bridge" or "Host" (basically the same as before). Will the "Custom" option only show under specific conditions?
June 5, 20179 yr Did you stop the container before trying. Kevin 16 minutes ago, billington.mark said: I don't get this option. Only "None", "Bridge" or "Host" (basically the same as before). Will the "Custom" option only show under specific conditions?
June 5, 20179 yr 1 minute ago, digitalfixer said: Did you stop the container before trying. Kevin I have indeed. I also only get "None", "Bridge" or "Host" as network options on new containers as well.
June 5, 20179 yr 1 minute ago, billington.mark said: I have indeed. I also only get "None", "Bridge" or "Host" as network options on new containers as well. It definitely works, I just tried it on one of my containers and br0 was at the bottom of the list. The only other thing that comes to mind is, do you bridging enabled in network settings. If that doesn't fix it then one of the more knowledgable people will have the answer I'm sure. Kevin
June 5, 20179 yr 1 minute ago, digitalfixer said: It definitely works, I just tried it on one of my containers and br0 was at the bottom of the list. The only other thing that comes to mind is, do you bridging enabled in network settings. If that doesn't fix it then one of the more knowledgable people will have the answer I'm sure. Kevin Bridging is enabled and br0 is definitely available. (im posting from a VM using that bridge!)
June 5, 20179 yr 8 minutes ago, billington.mark said: Bridging is enabled and br0 is definitely available. (im posting from a VM using that bridge!) br0 must have an IP address either static or by DHCP
June 5, 20179 yr Author 36 minutes ago, digitalfixer said: Did you stop the container before trying. Kevin I did this without stopping the docker container.
June 5, 20179 yr 42 minutes ago, digitalfixer said: Did you stop the container before trying. Kevin Custom networks are only added when the Docker service itself is started. Stopping and starting a container has no effect.
June 5, 20179 yr 37 minutes ago, bonienl said: br0 must have an IP address either static or by DHCP FIXED. Restarted the docker service via the GUI and now i have the option. Only thing i can think is that because im running my router (pfsense) as a vm, br0 has no IP assigned when the docker service starts and only gets it after my pfsense VM is up and running.
June 6, 20179 yr 44 minutes ago, dlandon said: How do I get an IPV6 address on a docker without manually assigning one? When the custom network (br0 or eth0) has an IPv6 address assigned then the docker container will get automatically an IPv6 address out of the same subnet. The IPAM functionality of docker will assign the ::1 address as gateway address, you will need to set that address on your router if you want the container to go outside of your LAN.
June 6, 20179 yr when i give a docker container an ip (network set to br0), other containers, which are still set to network mode bridge, can't connect to the first one. example: the plex container is set to ip 192.168.0.20 the plexpy container is set to bride (running on unraid on ip 192.168.0.15). in this case, plexpy can't connect to plex on the set ip. I'm guessing there are some routing-problems. other thing: I've noticed, that everytime i changed something in the container (would possibly happen on an update, too), the container gets a new MAC id. This can lead to loosing port forwarding rules set for that container in the router. (in my case, the computer to forward the port to is selected via MAC and not IP, since the IP could change on DHCP devices) Edited June 6, 20179 yr by Benni-chan
June 6, 20179 yr 11 minutes ago, Benni-chan said: when i give a docker container an ip (network set to br0), other containers, which are still set to network mode bridge, can't connect to the first one. example: the plex container is set to ip 192.168.0.20 the plexpy container is set to bride (running on unraid on ip 192.168.0.15). in this case, plexpy can't connect to plex on the set ip. I'm guessing there are some routing-problems. other thing: I've noticed, that everytime i changed something in the container (would possibly happen on an update, too), the container gets a new MAC id. This can lead to loosing port forwarding rules set for that container in the router. (in my case, the computer to forward the port to is selected via MAC and not IP, since the IP could change on DHCP devices) For containers to communicate they need to be on the same interface like br0.
June 6, 20179 yr On 6/5/2017 at 7:28 AM, bonienl said: br0 must have an IP address either static or by DHCP There's a use case for the host not having an IP address on a bridge. A second nic connecting the wan interface of a firewall docker or vm to the outside world is a good example. Its also useful at times to have a bridge with no host interface. An example is a test environment where Dockers and/or VMs can talk, with no access to the outside world. I needed to start a Windows VM with no network access. Since I couldn't find a way to disable the virtual nic, I created a bridge with no interface, and edited the XML file to access this bridge.
June 6, 20179 yr 1 hour ago, Porkie said: For containers to communicate they need to be on the same interface like br0. Correct Docker treats "bridge" as a single network and containers set up in bridge mode are all in the same network. A container in a custom network, e.g. br0 is a different network to Docker.
June 6, 20179 yr 1 hour ago, aim60 said: There's a use case for the host not having an IP address on a bridge. A second nic connecting the wan interface of a firewall docker or vm to the outside world is a good example. Its also useful at times to have a bridge with no host interface. An example is a test environment where Dockers and/or VMs can talk, with no access to the outside world. I needed to start a Windows VM with no network access. Since I couldn't find a way to disable the virtual nic, I created a bridge with no interface, and edited the XML file to access this bridge. The "problem" with interfaces without an IP assignment is that no automatic settings can be propagated to Docker as it is unknown what to assign.
June 6, 20179 yr 1 hour ago, Benni-chan said: other thing: I've noticed, that everytime i changed something in the container (would possibly happen on an update, too), the container gets a new MAC id. This can lead to loosing port forwarding rules set for that container in the router. (in my case, the computer to forward the port to is selected via MAC and not IP, since the IP could change on DHCP devices) With custom networks you have the possibility to set a fixed IP address for the container. Forwarding rules on your firewall can refer to this IP address.
June 6, 20179 yr Author 2 minutes ago, bonienl said: With custom networks you have the possibility to set a fixed IP address for the container. Forwarding rules on your firewall can refer to this IP address. This is exactly what I am doing for ownCloud, MineOS, and Zoneminder dockers so they are accessible from the internet.
Archived
This topic is now archived and is closed to further replies.