Docker snap fails to start

Hi, using a Dell EDGE Gateway 5000 with Ubuntu Core 16 I installed docker snap version 1.13.1-0 rev:88 and I cannot launch the docker service

journalctl says that:

Apr 26 10:14:37 localhost.localdomain systemd[1]: Started Service for snap
application docker.dockerd.
Apr 26 10:14:37 localhost.localdomain snap[2662]:
/snap/docker/88/bin/dockerd-wrapper: 23:
/snap/docker/88/bin/dockerd-wrapper: useradd: Permission denied
Apr 26 10:14:37 localhost.localdomain systemd[1]:
snap.docker.dockerd.service: Main process exited, code=exited,
status=126/n/a
Apr 26 10:14:37 localhost.localdomain systemd[1]:
snap.docker.dockerd.service: Unit entered failed state.
Apr 26 10:14:37 localhost.localdomain systemd[1]:
snap.docker.dockerd.service: Failed with result 'exit-code'.
Apr 26 10:14:37 localhost.localdomain systemd[1]:
snap.docker.dockerd.service: Service hold-off time over, scheduling restart.
Apr 26 10:14:37 localhost.localdomain systemd[1]: Stopped Service for snap
application docker.dockerd.
Apr 26 10:14:37 localhost.localdomain systemd[1]:
snap.docker.dockerd.service: Start request repeated too quickly.
Apr 26 10:14:37 localhost.localdomain systemd[1]: Failed to start Service
for snap application docker.dockerd.

Any idea about how to solve that, thanks.

As of now, docker snap requires some manual setup to have account-control connected after the first installation. Basically, it’s a workaround we leave for the missing feature of system user/group on snappy. Only with this, the login user can run docker under the $HOME without sudo.

You can run the following command to make docker snap works on Ubuntu Core 16 upon installation.

$  sudo snap connect docker:account-control :account-control
$  sudo snap connect docker:home :home
$  snap disable docker && snap enable  docker
$  newgrp docker-snap

Meanwhile, you can run the following command to learn how to setup docker snap on Classic.

$ docker.help

P.S Regarding the usage of account-control interface in docker-snap, it’s still under discussion. You can check this thread for more details
Snap declaration request for docker-snap

Thanks.

1 Like