Skip to content

Feature Request: allow config-from in docker-compose files for swarm stacks #2851

@haydenseitz

Description

@haydenseitz

Goals

  • allow networks created with --config-from to not be considered "dangling" when running docker system prune
  • associate --config-from networks to the service stack they are used in

Description
Currently, when I create a local bridge network on each of my swarm nodes using --config-only, those networks are not removed with docker system prune. However, when I create the actual swarm network with --config-from, that network is removed with docker system prune. Having the ability to define a config-from network in the swarm compose file that is related to the service stack would be helpful, and I would assume would also prevent it being considered a dangling network.

From what I have found, there is no configuration option for --config-from in docker-compose files. It would be nice to have a flag under .network.<network-name>.ipam.config, such as .network.<network-name>.ipam.config.config-from:

[...]
networks:
  my-network:
    ipam:
      config:
        - config-from: my-local-node-network

Related: #49, #605, #407

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