Skip to content

[BUG] Regression when overriding networks #11408

@c-w

Description

@c-w

Description

In v2.24.0 there is a regression when using an override file to reset a network to its default state. This used to work all the way up to v2.23.3.

My use-case for this scenario is to use a specific docker network name when running in production (using the docker-compose.yml file) while using the auto-generated network name when running in development (using the docker-compose.override.yml file).

Steps To Reproduce

  1. Create docker-compose.yml
services:
  test:
    image: hello-world
    networks:
      test:

networks:
  test:
    name: test
    external: true
  1. Create docker-compose.override.yml
networks:
  test:
  1. Run docker compose up and observe exit code 15 with error message "cannot override networks.test"

Compose Version

First broken version: v2.24.0
Last good version: v2.23.3

Docker Environment

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions