-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[BUG] The up command does not honor dependencies since v2.19 #10959
Description
Description
Hi, we are using docker compose up --no-deps --wait $service1 $service2 to start a list of services. The list of services is dynamic. We noticed that since v2.19.0 (included) the depends_on specified in the compose file are not respected anymore: if $service1 depends on $service2, they are both started at the same time, independently of possible healthchecks that $service2 may have. In v.2.18 it used to work in a different way, as $service1 wouldn't be started until (and unless) $service2 was either started or healthy. docker compose up --no-deps --wait without the list of services still works as expected
Steps To Reproduce
We created a repo that reproduces the issue and tested it with v2.18, v2.19, v2.20 and v2.21: https://github.com/neslinesli93/docker-compose-up-bug
Compose Version
v2.18.1 is the latest one working
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.18.1
Path: /home/neslinesli93/.docker/cli-plugins/docker-compose
Server:
Containers: 3
Running: 1
Paused: 0
Stopped: 2
Images: 52
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: runc io.containerd.runc.v2 nvidia
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.4.6-76060406-generic
Operating System: Pop!_OS 22.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 31.07GiB
Name: estremo
ID: d64e6bb8-de62-423e-9c76-0dcb7f612812
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