解决ERROR: Couldn't connect to Docker daemon at http://127.0.0.1:4243 - is it running
程序员文章站
2022-03-12 12:33:36
...
使用docker-compose up -d,会提示下面的错误提示:
[[email protected] ~]$ docker-compose up -d
ERROR: Couldn't connect to Docker daemon at http://127.0.0.1:4243 - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
解决方案如下:
1.关闭docker服务
$ sudo service docker stop
2.通过守护进程运行
sudo nohup docker daemon -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock &
3.检查端口2375是否已经有进程监听,然后配置环境变量DOCKER_HOST
netstat -anpt | grep 2375
[xxx@docker ~]$ netstat -anpt | grep 2375
(No info could be read for "-p": geteuid()=18922 but you should be root.)
tcp6 0 0 :::2375 :::* LISTEN -
$vim ~/.bashrc
export DOCKER_HOST=tcp://localhost:2375
4.运行docker-compose up -d
推荐阅读
-
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
-
Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
-
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
-
ERROR: Couldn‘t connect to Docker daemon at http+docker://localhost - is it running?
-
解决ERROR: Couldn't connect to Docker daemon at http://127.0.0.1:4243 - is it running
-
解决 docker中 error:Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
-
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
-
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
-
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
-
解决ERROR: Couldn't connect to Docker daemon at http://127.0.0.1:4243 - is it running