Issue: Every time I reboot or shut down, I have to wait an arbitrary number of minutes due to systemd when it tries to stop the Docker Application Engine.
- xubuntu 18.04 on a Lenovo Thinkpad x260
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
- docker installed via apt
Docker version 18.09.0-ce-tp5, build 9eb3d36
systemd 237 +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid
- No containers are running at the time of the shutdown request. I explicitly stopped and removed them beforehand (
docker container ls --allshows nothing).
Behavior: After I click the "Shutdown" or "Reboot" button, the GUI shuts down and shows the xubuntu logo with a spinning icon. Pressing Esc, I am welcomed by the systemd service status screen. Only 2-3 lines occur (as can be seen in the photo below), then I have to wait arbitrarily long (values between 1min and 25min actively observed). Because I cannot ensure that systemd will terminate any time soon, I usually use the hardware button to shutdown my machine. This issue occurs since I have docker installed on my system.
[ OK ] Started Show Plymouth Power Off Screen. [ *] A stop job is running for Docker Application Container Engine (14s / no limit)[ OK ] Started Show Plymouth Power Off Screen. [ ** ] A stop job is running for Docker Application Container Engine (24min 27s / no limit)
Question: how can I make docker stop gracefully?