解决 ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
ubuntu16.04 安装完docker后在docker-compose.yml文件所在目录执行:jing@ubuntu:/tmp/docker$docker-compose up -d报错:ERROR: Couldn’t connect to Docker daemon at http+docker://localunixsocket - is it runnin...
ubuntu16.04 安装完docker后在docker-compose.yml文件所在目录执行:
jing@ubuntu:/tmp/docker$ docker-compose up -d
报错:
ERROR: Couldn’t connect to Docker daemon at http+docker://localunixsocket - is it running?
If it’s at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
网上各种路七八糟的解决方式,真是吐槽。
正确的是将当前用户加入docker组
jing@ubuntu:/tmp/docker$ sudo gpasswd -a ${USER} docker
然后退出当前用户比如切换为root,再次切换为jing。然后执行docker-compose up -d就ok了。
jing@ubuntu:/tmp/docker$ sudo su
root@ubuntu:/tmp/docker$ su jing
jing@ubuntu:/tmp/docker$ docker-compose up -d
更多推荐
所有评论(0)