What is the purpose of the "ipam" key in a Docker Compose config?

nexusguy59 picture nexusguy59 · May 20, 2018 · Viewed 13.5k times · Source

I am new to Docker but not so new I don't understand the cli of Docker. However I am very new to the Docker file and Docker Compose way of doing things. If someone could explain to me this section of the docker-compose.yml I would greatly appreciate it.

My comments are embedded:

networks:
  vpcbr: <-I know what this is
    driver: bridge <-I know what this is
    ipam:  <-What the heck is this for?
     config: <-I know what this is.
       - subnet: 10.5.0.0/16 <- Obvious
         gateway: 10.5.0.1 <- Obvious

Answer

Miq picture Miq · May 20, 2018

IPAM is the name of configuration section.

IPAM is an acronym, that stands for IP Address Management.

see more here: https://blog.docker.com/2016/03/docker-networking-design-philosophy/