(虚拟机环境ubuntu16.04)
在编译漏洞环境的时候碰到到
ERROR: Couldn't connect to Docker daemon at http://localhost:4243 - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
参考:http://blog.csdn.net/qiyueqin…
并没有解决到这个问题
1.查看配置文件:sudo systemctl show docker | grep FragmentPath=
FragmentPath=/lib/systemd/system/docker.service
vim /lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://0.0.0.0:4243 #注意这里的0.0.0.0根据自己的需求配置是否只需要配置本地
2.配置/etc/default/docker
cat /etc/default/docker
DOCKER_OPTS="-H tcp://localhost:4243 -H unix:///var/run/docker.sock" #DOCKER_OPTS的设置
3.DOCKER_HOST的环境变量设置 参考csdn链接
4.重启docker
sudo systemctl daemon-reload
sudo systemctl restart docker
查看下端口
netstat -ant
tcp6 0 0 :::4243 :::* LISTEN
再次编译环境。成功