Docker Plugin - IP address for local network

  • Hello!


    I'm trying to make my docker containers run with an IP on the local network (192.168..etc) but no success.
    When I set it to "Host" or "Bridge" adapter, the container is using the OMV hosts IP.
    I also tried setting up a macvlan network but it did not work.


    Any suggestions? :(

  • ---SOLVED---


    Just figured out that in the macvlan I had the put the networks interface name in to the "Parent" value, now I it works.


    ---SOLVED---

  • Is your OMV connected directly to the internet with a public IP address?

    --
    Google is your friend and Bob's your uncle!


    A backup strategy is worthless unless you have a verified to work by testing restore strategy.


    OMV AMD64 7.x on headless Chenbro NR12000 1U Intel Xeon CPU E3-1230 V2 @ 3.30GHz 32GB ECC RAM.


  • No sir, there is a router.
    I didn't fill the parent value when creating the macvlan adapter, now I've entered the interface name that's connected to the router and it works! :)


    With that aside, is it possible to broadcast the "Bridge" ip addresses (172.17.0.0/16) to the local (192.168.1.0/24) network, so I could reach the docker container by the 172.17.0.x ip address from a remote machine on the network?

  • What docker are you running? If it is providing an exposed service it should be doing so on the OMV IP address.


    Generally speaking, running containers on Host networking is the easiest way, if the container will allow it.

    --
    Google is your friend and Bob's your uncle!


    A backup strategy is worthless unless you have a verified to work by testing restore strategy.


    OMV AMD64 7.x on headless Chenbro NR12000 1U Intel Xeon CPU E3-1230 V2 @ 3.30GHz 32GB ECC RAM.


    • Official Post

    With that aside, is it possible to broadcast the "Bridge" ip addresses (172.17.0.0/16) to the local (192.168.1.0/24) network, so I could reach the docker container by the 172.17.0.x ip address from a remote machine on the network?

    Generally speaking - No and it's not a good idea to try. The 172.x.x.x is an internal network, used by the Docker app, to communicate with it's containers. Separating this internal network, from your LAN network, is part of the isolation measures Docker uses to prevent a compromised container from taking over the host or other machines on your physical network.


    As @gderf has said, the best way to control or enter a container is through the HOST controlling it (OMV). If you want to get into the containers file structure, that's part of what Volumes and Bind points is for.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!