compose: Docker-compose no longer gracefully stops
Expected behavior
Successful graceful shutdown of docker-compose
Actual behavior
All containers are stopped, but compose is hanging on forever until we are forced to kill it.
Gracefully stopping... (press Ctrl+C again to force)
[+] Running 7/7
⠿ Container PRJ-dev_spark-worker_1 Stopped 11.3s
⠿ Container PRJ-dev_spark-master_1 Stopped 12.2s
⠿ Container PRJ-dev_kafka-schemaregistry_1 Stopped 11.3s
⠿ Container PRJ-dev_mongodb_1 Stopped 12.3s
⠿ Container PRJ-dev_object-storage_1 Stopped 1.7s
⠿ Container PRJ-dev_kafka_1 Stopped 4.3s
⠿ Container PRJ-dev_zookeeper_1 Stopped 11.4s
(hanging forever …)
^CERRO[3631] got 3 SIGTERM/SIGINTs, forcing shutdown
[+] Running 0/0
⠿ Container PRJ-dev_mongodb_1 Error while Killing 0.0s
⠿ Container PRJ-dev_spark-worker_1 Error while Killing 0.0s
⠿ Container PRJ-dev_object-storage_1 Error while Killi... 0.0s
⠿ Container PRJ-dev_spark-master_1 Error while Killing 0.0s
⠿ Container PRJ-dev_kafka-schemaregistry_1 Error while... 0.0s
⠿ Container PRJ-dev_kafka_1 Error while Killing 0.0s
⠿ Container PRJ-dev_zookeeper_1 Error while Killing
Information
- macOS Version: 10.15.7
- Intel core i7
- Docker Desktop version: 3.5.1 (3.5.1.7)
- Docker Compose version: 2.0.0-beta.4
Steps to reproduce the behavior
- On a fresh Docker Desktop (after data purge),
docker-compose -f any-conf.yml up
- Once everything is up,
Ctrl+C
to gracefully stop
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 14
- Comments: 32 (1 by maintainers)
Hello everybody,
Sorry for the “end of the year delay”. This issue has been fixed by #9019 and version
2.2.3
will be released soon.@designermonkey This will be included in the next version of Docker Desktop.
Same here on MacOS:
+1 same problem
OS: Windows 10 Docker Engine v20.10.11 Docker Compose v2.2.1 Docker Desktop Docker Desktop 4.3.2 (72729) Using WSL 2
As said, whatever compose, even single service, it exhibit the issue (doubt it was a good idea to include a beta version of compose in Docker desktop …).
docker compose up
never closes. If I do Cntrl+C twice its showsError while killing
and never exits.Using
Arch Linux
with kernel5.15.12-arch1-1
docker:20.10.12, build e91ed5707e
docker-compose:2.2.2
I face the same problem in Manjaro. docker-compose.yml
and Dockerfile
docker version
command output:uname -a
command output:My docker container up and run successfully but It cannot stop containers gracefully and I have to press
ctrl + c
twice.Having the same with Compose 2.2.2 and Docker 20.10.11 on Archlinux.
This also occurs on my machine; same setup as OP, latest Docker Desktop on Mac. This is pretty annoying.
@ulyssessouza will this create a new update for Docker Desktop (Mac) as mine says it is fully up to date (
4.3.2 (72729)
) yet only hasv2.2.1
fordocker compose
?I’m still seeing this error with v2.2.0 on Linux.
Ok, I can confirm this issue is reproducible once the service is set with
restart: on-failure