不确定这是一个码头问题,但事情就是这样:我试过sudo docker stop 7f8c9285465c
导致
Error response from daemon: cannot stop container: 7f8c9285465c: Cannot kill container...unknown error after kill: runc did not terminate sucessfully: container_linux.go:392: signaling init process caused "permission denied"
按照这个 stackoverflow 建议我做了sudo aa-remove-unknown
。现在docker stop
成功但随后docker-compose up
导致:
snap-confine has elevated permissions and is not confined but should be. Refusing to continue to avoid permission escalation attacks
.
接下来我运行命令sudo apt purge snapd snap-confine && sudo apt install -y snapd
。现在运行docker-compose up
结果
bash: /snap/bin/docker-compose: No such file or directory
.
该命令sudo docker container ls
导致:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
sudo service docker status
返回Active: active (running)
。
我尝试重新安装docker。运行sudo docker run hello-world
相同的返回Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
值(尽管状态是活动的)。