Raspberry Pi 3上的Ubuntu Core 16无法连接到Docker守护程序



设置新鲜的Ubuntu Core 16 Raspberry Pi机器。使用来自Ubuntu Core网页的图像。

并用snap上安装docker:

snap install docker

我无法使用docker,因为我有一个错误:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Docker服务状态不活动(死(:

sudo 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: inactive (dead) (Result: exit-code) since Wed 2017-05-03 10:30:55 UTC; 30min ago
Process: 1975 ExecStart=/usr/bin/snap run docker.dockerd (code=exited, status=126)
Main PID: 1975 (code=exited, status=126)
May 03 10:30:54 localhost.localdomain systemd[1]: snap.docker.dockerd.service: Unit entered failed state.
May 03 10:30:54 localhost.localdomain systemd[1]: snap.docker.dockerd.service: Failed with result 'exit-code'.
May 03 10:30:55 localhost.localdomain systemd[1]: snap.docker.dockerd.service: Service hold-off time over, scheduling restart.
May 03 10:30:55 localhost.localdomain systemd[1]: Stopped Service for snap application docker.dockerd.
May 03 10:30:55 localhost.localdomain systemd[1]: snap.docker.dockerd.service: Start request repeated too quickly.
May 03 10:30:55 localhost.localdomain systemd[1]: Failed to start Service for snap application docker.dockerd.

使用:

重新启动Docker服务
sudo systemctl stop snap.docker.dockerd.service
sudo systemctl start snap.docker.dockerd.service

无济于事。

Docker版本输出:

Client:
Version:      1.13.1
API version:  1.26
Go version:   go1.7.5
Git commit:   -snap-a2d8d8c
Built:        Fri Apr 21 08:56:55 2017
OS/Arch:      linux/arm
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

docker的快照连接:

snap interfaces |grep docker
:docker-support           docker:privileged,docker:support
:firewall-control         docker
:network                  docker
:network-bind             docker
docker:docker-daemon      docker:docker-cli
-                         docker:account-control
-                         docker:home

正确启动Docker守护程序还需要其他步骤吗?

upd:docker服务日志

 sudo journalctl -u snap.docker.dockerd.service -f
 -- Logs begin at Wed 2017-05-03 15:56:02 UTC. --
 May 03 16:12:58 localhost.localdomain systemd[1]: Stopped Service for snap application docker.dockerd.
 May 03 16:12:58 localhost.localdomain systemd[1]: Started Service for snap application docker.dockerd.
 May 03 16:12:59 localhost.localdomain snap[1697]: /snap/docker/91/bin/dockerd-wrapper: 23: /snap/docker/91/bin/dockerd-wrapper: useradd: Permission denied
 May 03 16:12:59 localhost.localdomain systemd[1]: snap.docker.dockerd.service: Main process exited, code=exited, status=126/n/a
 May 03 16:12:59 localhost.localdomain systemd[1]: snap.docker.dockerd.service: Unit entered failed state.
 May 03 16:12:59 localhost.localdomain systemd[1]: snap.docker.dockerd.service: Failed with result 'exit-code'.
 May 03 16:12:59 localhost.localdomain systemd[1]: snap.docker.dockerd.service: Service hold-off time over, scheduling restart.
 May 03 16:12:59 localhost.localdomain systemd[1]: Stopped Service for snap application docker.dockerd.
 May 03 16:12:59 localhost.localdomain systemd[1]: snap.docker.dockerd.service: Start request repeated too quickly.
 May 03 16:12:59 localhost.localdomain systemd[1]: Failed to start Service for snap application docker.dockerd.

我有与您相同的问题,但是在执行本文中给出的命令后再次工作。

这些是命令:

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

相关内容

  • 没有找到相关文章

最新更新