-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Description
In the documentation, it is said that docker compose wait SERVICE [SERVICE...] waits for the first service to exit. However, it seems to wait for all the listed services to exit.
Steps To Reproduce
- With the compose file:
services:
service1:
image: ubuntu:latest
command: tail -f /dev/null
service2:
image: ubuntu:latest
command: tail -f /dev/null- Run
docker compose up -d - Run
docker compose wait service1 service2 - In another terminal, show the running containers
docker ps:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7d71dc7baa3a ubuntu:latest "tail -f /dev/null" 14 seconds ago Up 1 second service1-1
357917766e1e ubuntu:latest "tail -f /dev/null" 14 seconds ago Up 2 seconds service2-1
- Kill one of the containers
docker kill 7d - The wait command doesn't exit, but prints that the container was killed.
- Kill the other container
docker kill 35 - The wait command prints that the second container was killed, and exits.
Compose Version
Docker Compose version v2.29.1
Docker Environment
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: 0.11.2+azure-1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.29.1
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 8
Running: 0
Paused: 0
Stopped: 8
Images: 26
Server Version: 23.0.6+azure-2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: false
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
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: 82f18fe0e44a59034f3e1f45e475fa5636e539aa
init version:
Security Options:
apparmor
seccomp
Profile: builtin
Kernel Version: 5.15.0-1042-azure
Operating System: Ubuntu 20.04.6 LTS
OSType: linux
Architecture: x86_64
CPUs: 36
Total Memory: 433GiB
Name: normar1-compute-a10
ID: 4550194d-ba4a-4572-97e6-5994cbaf589a
Docker Root Dir: /images/disk1/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Anything else?
No response