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? :(

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

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


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 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!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    • Offizieller Beitrag

    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.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!