我正在运行一个使用 cli 的 GitHub 自托管操作运行器,docker
但我运行它的主机正在用作containerd
运行时。docker
已安装,但没有活动的/var/run/docker.sock
。我该如何修复此问题以便 GitHub 操作运行器正常工作?
pi@kube-master:~ $ sudo find / -name "docker.sock"
pi@kube-master:~ $ sudo find / -name "containerd.sock"
/run/containerd/containerd.sock
pi@kube-master:~ $ docker info
Client: Docker Engine - Community
Version: 25.0.3
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.12.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.24.5
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
答案1
确实,containerd
安装和升级时docker
systemd 服务被禁用。
只需这样做sudo systemctl enable --now docker
即可解决该问题。