-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Closed
compose-spec/compose-go
#579Closed
Copy link
Labels
Description
Description
When an included file contains relative paths (at least) for build contexts or volume definitions, docker compose config --no-path-resolution
outputs the full paths. It doesn't look like a regression, maybe a missing feature, but nevertheless, please see below.
Steps To Reproduce
- Create the
compose.yaml
include:
- path: included.yaml
services:
extended:
extends:
file: included.yaml
service: included
- Create an
included.yaml
services:
included:
build: .
volumes:
- ./:/mnt
- Observe the output of the
config
command
$ docker compose config --no-path-resolution
name: inc
services:
extended:
build:
context: .
dockerfile: Dockerfile
networks:
default: null
volumes:
- type: bind
source: .
target: /mnt
bind:
create_host_path: true
included:
build:
context: /path/to/inc
dockerfile: Dockerfile
networks:
default: null
volumes:
- type: bind
source: /path/to/inc
target: /mnt
bind:
create_host_path: true
networks:
default:
name: inc_default
The example is set up so that what's actually the same service gets presented in different ways.
Compose Version
Docker Compose version v2.24.6
Docker Environment
No response
Anything else?
No response