Skip to content

Configuration of default-address-pools for non-swarm daemon #1042

@SteenSchutt

Description

@SteenSchutt

Use Case

My network is conflicting with docker's default address pool (IIRC it uses 172.17.0.0. I don't remember the mask size, but not important), so I need to set bip and default-address-pools in daemon.json on all of my docker installations to avoid addressing conflicts.

I personally abuse the networks intended for network benchmarking for this purpose, since my workplace is using all three RFC1918 private ranges and IP conflicts are a nightmare I don't want to risk, even though I could probably just use IPv6 ULA instead:

{
  "bip": "198.18.127.1/24",
  "default-address-pools": [
    { "base": "198.18.128.0/17", "size": 24 }
  ]
}

Describe the Solution You Would Like

I would like to see the addition of default_addr_pool and default_addr_pool_mask_length (or similar) to the baseline docker class alongside the bip parameter. Currently these only exist in the swarm defined resource, and I don't use swarm.

Describe Alternatives You've Considered

I am currently planning on managing the package, config and service myself while only using this module to manage the resources running in docker themselves (e.g. containers, images, networks and volumes). I have to manage some things myself anyway, since this module doesn't support EL10.

I haven't tried, but it may also be possible to manage the daemon.json file on top of the configuration done by puppet using the command line arguments, and it's still a bit messy.

It is also possible to work around the issue by defining the ranges for all networks manually, but I'd rather just have docker assign them automatically since I don't rely on the IP addresses for anything anyway.

Additional Context

It's not entirely clear to me from the documentation how you do this with command line options, but it looks like it should be possible: https://docs.docker.com/reference/cli/dockerd/

--default-address-pool pool-options     Default address pools for node specific local networks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions