I have a docker-compose project with container configurations in subdirectories like
.
├── a.yml
└── b
└── b.yml
a.yml is
version: "2.2"
services:
a:
build:
context: ./
b.yml is
version: "2.2"
services:
b:
build:
context: ./
COMPOSE_FILE=a.yml:b/b.yml
docker-compose config
results in
services:
a:
build:
context: /Volumes/Disk/Development/spaces/docker/docker-compose-relative-path
b:
build:
context: /Volumes/Disk/Development/spaces/docker/docker-compose-relative-path
version: '2.2'
According to https://docs.docker.com/compose/compose-file/compose-file-v2/#context the context path should be relative which it does not appear to be! For service b it should be /Volumes/Disk/Development/spaces/docker/docker-compose-relative-path/b
.
Is this considered to be a bug or just a flaw in the documentation?