错误 Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

进入 /etc/docker,没有daemon.json文件就自己新建一个:
编辑daemon.json文件:

{
 "registry-mirrors": ["https://registry.docker-cn.com",
    "https://blkjc4x3.mirror.aliyuncs.com",
    "http://f1361db2.m.daocloud.io",
    "https://mirrors.cloud.tencent.com" 
 ]
}

systemctl restart docker
  • Failed to get D-Bus connection: Operation not permitted
privileged: true
  • cgroup is not mounted
    NanoCPUs can not be set, as your kernel does not support CPU CFS scheduler or the cgroup is not mounted
reboot重启能解决

WARING:No swap limit support

vi /etc/default/grub

找到 GRUB_CMDLINE_LINUX=这一行在后面双引号内增加空格 cgroup_enable=memory swapaccount=1 然后保存文件
GRUB_CMDLINE_LINUX="... cgroup_enable=memory swapaccount=1"

#刷新引导文件
sudo update-grub
reboot