跳转到帖子

Docker问题解决:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon runnin

Featured Replies

  • 网站管理

在使用docker ps 或者 docker images的时候提示:

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

原因分析:

从错误信息可以看到,可能是docker没有正常启动。

使用如下命令:

systemctl daemon-reload systemctl restart docker.service

执行完成之后,重新docker ps 就正常了。

扩展:docker 一键启动

一键启动所有docker 容器:docker start $(docker ps -a | awk '{ print $1}' | tail -n +2)

一键关闭所有docker 容器:docker stop $(docker ps -a | awk '{ print $1}' | tail -n +2)

一键删除所有docker 容器:docker rm $(docker ps -a | awk '{ print $1}' | tail -n +2)

一键删除所有docker 镜像: docker rmi $(docker images | awk '{print $3}' |tail -n +2)

成长就是不断打破并重建三观

  • 查看数 0
  • 已创建
  • 最后回复
游客
回帖…

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.