I've been seeing the same issue too.
Now that I know it's not just me, I'll report it upstream and see if anything can be figured out.
Git Clone URL: | https://aur.archlinux.org/docker-rootless-extras.git (read-only, click to copy) |
---|---|
Package Base: | docker-rootless-extras |
Description: | Extras to run docker as non-root. |
Upstream URL: | https://docs.docker.com/engine/security/rootless/ |
Keywords: | containers docker isolation rootless |
Licenses: | Apache |
Conflicts: | docker-rootless, docker-rootless-extras, docker-rootless-extras-bin |
Provides: | docker-rootless, docker-rootless-extras, docker-rootless-extras-bin |
Submitter: | whynothugo |
Maintainer: | the-k |
Last Packager: | the-k |
Votes: | 35 |
Popularity: | 1.34 |
First Submitted: | 2021-04-14 17:58 (UTC) |
Last Updated: | 2025-05-31 11:31 (UTC) |
I've been seeing the same issue too.
Now that I know it's not just me, I'll report it upstream and see if anything can be figured out.
Yup, it's always best to confirm that it's not "just you" ;)
Thank you @WhyNotHugo. I was thinking about reporting to Moby but I was not sure if it was only on my side or global problem for everyone :)
Hmmm... interesting finds.
I've run a single docker container: docker run --rm -it node:12 bash
, and then systemctl --user stop docker.service
. The container is stopped immediately, but docker takes a while to stop (20s in my case, and I'm using an override to force it to stop in 20s -- so it basically seems that it does not exit).
It seems that, if containers are running, docker stops them immediately, but docker itself does not exist quickly.
It also seems that if I stop docker, I cannot restart it without rebooting -- it seems to leave somthing in a broken state.
I'm reporting this upstream, since it doesn't seem like a packaging error: https://github.com/moby/moby/issues/41944
@WhyNotHugo you're right. If i stop every container manually before stopping service it works... But I don't understand why docker won't stop if there is running container?
PS: I've only one container launch, and it took way less than 2mins to stop. I mean is not related to time to stop the container.
PS2: and stop with --now
on docker.socket
does not help. Only stopping every containers works but it's a bit problematic
PS3: even with only and simplest container running docker run -d nginx
. That stucks on stop
.
If you merely start docker, but start no containers, does it also take too long to shut down?
I'm asking this since I want to understand if the issue is in stopping the daemon itself, or if the daemon takes too long to stop containers.
@WhyNotHugo TimeoutStopSec
is not real a solution is just masking the problem. If I'm not able to find something more reliable, I may switch to that.
(I don't have my linux box atm to test), but I'll try to edit both systemd units to add Before & After. To force stoping docker.socket
before docker.service
. It may be work.
Oh, I've also been having long waits when powering off, but systemd
did not clarify which service was holding it back.
Maybe try systemctl --user edit docker.service
, and adding:
[Service]
TimeoutStopSec=20
Pinned Comments