Docker命令(cli)默认为端口而不是套接字 [英] Docker command (cli) defaulting to port instead of socket
问题描述
我已经更改了docker守护进程,例如: / usr / bin / docker daemon -H tcp://0.0.0.0:2375
现在,当我执行它挂起的命令停靠点。所以我需要的是执行 docker -H:2375< command>
。
I've changed the docker daemon to listen on port eg: /usr/bin/docker daemon -H tcp://0.0.0.0:2375
Now when I execute the command docker it hangs on. So what I need is to execute docker -H :2375 <command>
.
有什么办法要设置docker命令(cli)来自动使用端口不是套接字(所以当我调用docker ps时,它会调用docker -H:2375 ps)?
Is there any way how to setup docker command (cli) to automatically use the port not the socket (so when I call docker ps it will call docker -H :2375 ps)?
谢谢
推荐答案
您可以在您的环境中设置以下内容(请参阅 cli文档以获取更多选项):
You can set the following in your environment (see the cli documentation for more options):
export DOCKER_HOST=127.0.0.1:2375
这篇关于Docker命令(cli)默认为端口而不是套接字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!