How is the docker service named

How is docker installed from snap?

thufir@dur:~$ 
thufir@dur:~$ sudo snap install docker
docker 17.06.1-ce from 'docker-inc' installed
thufir@dur:~$ 
thufir@dur:~$ sudo service docker start
Failed to start docker.service: Unit docker.service not found.
thufir@dur:~$ 
thufir@dur:~$ sudo systemctl status docker
Unit docker.service could not be found.
thufir@dur:~$ 
thufir@dur:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 17.10
Release:	17.10
Codename:	artful
thufir@dur:~$ 
thufir@dur:~$ snap list
Name         Version     Rev   Developer   Notes
core         16-2.29.3   3440  canonical   core
docker       17.06.1-ce  171   docker-inc  -
hello-world  6.3         27    canonical   -
ubuntu-make  master      116   didrocks    classic
thufir@dur:~$ 

see also:

https://askubuntu.com/q/977961/45156

As it’s a snap, the service name is different…

alan@deep-thought:~$ sudo snap install docker
[sudo] password for alan: 
docker 17.06.1-ce from 'docker-inc' installed
alan@deep-thought:~$ systemctl status snap.docker.dockerd.service
● snap.docker.dockerd.service - Service for snap application docker.dockerd
   Loaded: loaded (/etc/systemd/system/snap.docker.dockerd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2017-11-19 11:14:37 GMT; 11s ago
 Main PID: 4132 (dockerd)
    Tasks: 20 (limit: 4915)
   CGroup: /system.slice/snap.docker.dockerd.service
           ├─4132 dockerd -G docker --debug --log-level=debug --exec-root=/var/snap/docker/171/run/docker --graph=/var/snap/docker/common/var-lib-docker --pidfile=/var/snap/docker/171/run/docker.pid
           └─4197 docker-containerd -l unix:///var/snap/docker/171/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/snap/docker/171/run/docker/libcontainerd/containerd --shi

Nov 19 11:14:40 deep-thought docker.dockerd[4132]: time="2017-11-19T11:14:40.427583305Z" level=debug msg="Registering GET, /distribution/{name:.*}/json"
Nov 19 11:14:40 deep-thought docker.dockerd[4132]: time="2017-11-19T11:14:40.427721479Z" level=debug msg="Registering GET, /networks"
Nov 19 11:14:40 deep-thought docker.dockerd[4132]: time="2017-11-19T11:14:40.427810782Z" level=debug msg="Registering GET, /networks/"
Nov 19 11:14:40 deep-thought docker.dockerd[4132]: time="2017-11-19T11:14:40.427890342Z" level=debug msg="Registering GET, /networks/{id:.+}"
Nov 19 11:14:40 deep-thought docker.dockerd[4132]: time="2017-11-19T11:14:40.428008310Z" level=debug msg="Registering POST, /networks/create"
Nov 19 11:14:40 deep-thought docker.dockerd[4132]: time="2017-11-19T11:14:40.428101716Z" level=debug msg="Registering POST, /networks/{id:.*}/connect"
Nov 19 11:14:40 deep-thought docker.dockerd[4132]: time="2017-11-19T11:14:40.428270147Z" level=debug msg="Registering POST, /networks/{id:.*}/disconnect"
Nov 19 11:14:40 deep-thought docker.dockerd[4132]: time="2017-11-19T11:14:40.428403775Z" level=debug msg="Registering POST, /networks/prune"
Nov 19 11:14:40 deep-thought docker.dockerd[4132]: time="2017-11-19T11:14:40.428516688Z" level=debug msg="Registering DELETE, /networks/{id:.*}"
Nov 19 11:14:40 deep-thought docker.dockerd[4132]: time="2017-11-19T11:14:40.429434681Z" level=info msg="API listen on /var/run/docker.sock"

this is a snap, use the snap command to query its service statuses :wink:

ogra@anubis:~$ sudo snap services docker
Snap    Service  Startup  Current
docker  dockerd  enabled  active

(You can also use “snap start/stop” to manage the services …)

WRT docker, i’d recommend to also run the “docker.help” command that has some info about the setup specifics when using the snap …

1 Like

so simple, so obvious, so…

jeesh. ok, well, live and learn. thanks a million.

(I kid you not, just found out, few minutes ago, that I can just run docker hello world – I couldn’t understand how that was possible. Now at least I can understand that much!)