Docker Community Forums

Share and learn in the Docker community.

How to assign a specific IPv4 address to a docker-compose stack?

docker

(Kevinlong206) #1

Hi folks,

Playing with docker-compose, I love how services defined in compose 2.0 can automatically resolve eachother by name, inside the created network. Very handy.

But what about getting the compose “stack” reachable from outside machines? Can I configure it to DHCP from my actual LAN, or statically assign an IP that is on my true LAN subnet?

(how about on specific a VLAN I’ve created in my firewall, that may be distinct from the VLAN used by the underlying Ubuntu machine docker-engine is running on ) ?

Thanks,

  • Kevin