Sudo systemctl disable docker won't on Ubuntu 16.04

Tried all kinds of things
sudo systemctl disable docker says
Synchronizing state of docker.service with SysV init with /lib/systemd/systemd-sysv-install…
Executing /lib/systemd/systemd-sysv-install disable docker
insserv: warning: current start runlevel(s) (empty) of script docker' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of scriptdocker’ overrides LSB defaults (0 1 6).
insserv: warning: current start runlevel(s) (empty) of script docker' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of scriptdocker’ overrides LSB defaults (0 1 6).

systemd-manager says disabled, but it isn’t.
In sudo sysv-rc-conf Docker runlevels are unchecked

Docker keeps starting at boot.
Thanks
G.

Yes, you are right. I lost hours to find it out the hard way.

Not working is:
sudo systemctl disable docker
then enter
sudo systemctl is-enabled docker → answer is “disabled” (which is wrong, as it starts again)

also the deprecated command…
echo manual | sudo tee /etc/init/docker.override
…doesn’t change anything (upstart - How to enable or disable services? - Ask Ubuntu).

To see if it is running enter top in shell after restart.

Why can this be important? I don’t want the images to reside on my SSD Disk and created a second vdi (Oracle Virtualbox Harddisk), which configuration I wanted to save as /etc/docker/daemon.json:

{
“graph” : “/media/your-user/Docker”
}

Problem is that the share is not yet ready, when docker wants to access (although defined in the /etc/fstab for auto-mounting). As a result the machine crashes every time. :frowning:

Unfortunately, I dont have an answer. May be this is of help for other googlers.

Happy coding!

Edited 26.5.2017 3:00 AM:
In the end I made it by starting the crashed Ubuntu-VirtualBox container again and after doing some Linux automated repair stuff the docker didn’t start again. Checked via:
sudo systemctl status docker
that returned:

docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; disabled; vendor preset: enabled)
Active: inactive (dead)

Hi, I faced the same problem, and I tried to also stop docker.socket:
sudo systemctl disable docker.socket
and now it wont auto start on boot

I am thinking about a good way to make it auto-start after the external disk is mounted, any idea?

1 Like