-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Closed
compose-spec/compose-go
#538Labels
Description
Description
docker compose config --no-path-resolution
no longer works since 2.24.1 for services that extend another one from a different file
Steps To Reproduce
- Create
compose.yaml
services:
service:
build: .
volumes:
- ./:/mnt
extended:
extends:
file: another.yaml
service: service
- Create
another.yaml
services:
service:
build: .
volumes:
- ./:/mnt
- Run the config command with docker compose 2.24.1
$ docker compose config --no-path-resolution
name: bug
services:
extended:
build:
context: /path/to/bug
dockerfile: Dockerfile
networks:
default: null
volumes:
- type: bind
source: /path/to/bug
target: /mnt
bind:
create_host_path: true
service:
build:
context: .
dockerfile: Dockerfile
networks:
default: null
volumes:
- type: bind
source: ./
target: /mnt
bind:
create_host_path: true
networks:
default:
name: bug_default
- Run the config command with docker compose 2.23.3
$ docker compose config --no-path-resolution
name: bug
services:
extended:
build:
context: .
dockerfile: Dockerfile
networks:
default: null
volumes:
- type: bind
source: .
target: /mnt
bind:
create_host_path: true
service:
build:
context: .
dockerfile: Dockerfile
networks:
default: null
volumes:
- type: bind
source: ./
target: /mnt
bind:
create_host_path: true
networks:
default:
name: bug_default
- Note the differences
- the context path for the build and the source path for the volume of the extended service are resolved
Compose Version
Docker Compose version v2.24.1
Docker Environment
No response
Anything else?
No response
qhaas