centOS7.6安装完docker后在docker-compose.yml文件所在目录执行:docker-compose up -d
, 报告错误:
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
我的解决办法是启动docker:sudo systemctl start docker
如果你解决不了还可以试试下面的方法
- (1) 将当前用户加入docker组:
sudo gpasswd -a ${USER} docker
- (2) 或者
sudo docker-compose up
- 待续