Docker Community Forums

Share and learn in the Docker community.

Docker daemon starts automatically on Ubuntu using $docker subcommands

docker

(Hakan) #1

Hi all,

On my ubuntu 16.04, when I run $docker info/version/.....and soon, daemon starts automatically but instead I would expect to see nothing because normally Docker doesn’t run after rebooting the machine.

cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"

ps aux | grep docker
root      2197  0.0  0.0  14224   940 pts/0    S+   10:24   0:00 grep --color=auto docker

docker -v
Docker version 1.12.2, build bb80604

docker version
Client:
 Version:      1.12.2
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   bb80604
 Built:        Tue Oct 11 18:29:41 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.2
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   bb80604
 Built:        Tue Oct 11 18:29:41 2016
 OS/Arch:      linux/amd64

Now Docker starts automatically:

ps aux | grep docker
root      2210  0.9  4.9 492340 50756 ?        Ssl  10:28   0:00 /usr/bin/dockerd -H fd://
root      2216  0.0  1.0 265288 10396 ?        Ssl  10:28   0:00 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --shim docker-containerd-shim --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --runtime docker-runc

Also after typing systemctl status docker the status of docker.service is active now.

So how can I disable docker daemon not to start when doing docker run/version/info/ .... commands?


(Hakan) #2

I have found the solution! I installed docker via Ubuntu official repo: docker.io before changing APT to use the Docker official repository. After than, I installed the new version of Docker without removing files coming with docker.io. So using the following steps stop receiving any odd behaviour.

sudo apt-get purge "docker.io*"
sudo apt autoremove