Cannot connect to the Docker daemon

运行容器时遇到一个错误

# docker run -p 127.0.0.1:6379:6379 --name some-redis -d redis
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.

【爆款云服务器限时促销】
阿里云云服务器u1-实例2核4G 80G,新人专享渠道特惠价只要199元!特惠热卖中。 点击立即购买

这是因为Docker后台服务没有运行,我使用的时Mac电脑,所以找到Docker程序启动就好。如果你时Linux上运行提示这个可以这么启动容器服务

systemctl start docker

也可以设置成开机启动

systemctl enable docker
分享

TITLE: Cannot connect to the Docker daemon

LINK: https://www.qttc.net/488-cannot-connect-to-the-docker-daemon.html

NOTE: 原创内容,转载请注明出自琼台博客