-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Closed
Closed
Copy link
Labels
Description
Description
It seems that docker compose publish misses pushing the associated "extends" files when using profiles.
Steps To Reproduce
- With the compose files:
docker-compose.yml:
services:
etcd:
extends:
file: etcd/docker-compose.yml
service: etcd
environment:
ETCD_DEBUG: true
profiles: [ default ]
etcd/docker-compose.yml:
services:
etcd:
image: quay.io/coreos/etcd:v3.3.27
- Publishing the app as an OCI artifact:
docker compose --profile '*' publish oci://ghcr.io/my-org/my-compose-config:latest
- Results in failure when using that artifact:
- Expected result:
$ docker compose -f oci://ghcr.io/my-org/my-compose-config:latest --profile default config
name: compose-issue
services:
etcd:
profiles:
- default
environment:
ETCD_DEBUG: "true"
image: quay.io/coreos/etcd:v3.3.27
networks:
default: null
networks:
default:
name: compose-issue_default
- Actual results:
$ docker compose -f oci://ghcr.io/my-org/my-compose-config:latest --profile default config
INFO[0000] fetch failed after status: 404 Not Found host=*** spanID=db89337f59236507 traceID=34db7b71f1b9c951ca3b337db583a63c
open ~/.cache/docker-compose/ff3638119f2b259733ec2bc62ace1501edf2f729e80cae8c625c71cf34d724f5/etcd/docker-compose.yml: no such file or directory
Compose Version
Docker Compose version v2.40.0
Docker Environment
Anything else?
Not using "profiles" in the main docker-compose.yml file works:
docker-compose.yml:
services:
etcd:
extends:
file: etcd/docker-compose.yml
service: etcd
environment:
ETCD_DEBUG: true
etcd/docker-compose.yml:
services:
etcd:
image: quay.io/coreos/etcd:v3.3.27