Open
Description
Description
Imagine a stack like this:
services:
db:
image: postgres:13.3
environment:
POSTGRES_PASSWORD: example
POSTGRES_USER: example
POSTGRES_DB: example
depends_on:
hello-world:
condition: service_completed_successfully
hello-world:
image: hello-world
profiles:
- hello
In previous versions of docker compose
I could run docker compose up
and it would start the db
container without any problems. Recently I upgraded docker
and was really surprised that it didn't work anymore. Here is the output of `docker compose up':
service hello-world is required by db, but is disabled. Can be enabled using profiles [hello]
This is a devastating change for many compose stacks, and wasn't even mentioned in the changelog :(
There is also another surprising behaviour when running docker compose logs db
reports:
no such service: hello-world
Steps To Reproduce
- Run
docker compose up
with the config above.
Compose Version
Any > 2.17.3(?)
Docker Environment
Client: Docker Engine - Community
Version: 24.0.5
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.11.2
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.20.2
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 16
Running: 0
Paused: 0
Stopped: 16
Images: 266
Server Version: 24.0.5
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 8165feabfdfe38c65b599c4993d227328c231fca
runc version: v1.1.8-0-g82f18fe
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.2.0-32-generic
Operating System: Ubuntu 22.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.22GiB
Name: maciej-Latitude-5410
ID: f4474bd0-abf8-4754-b75e-03c216f7b106
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Anything else?
No response