Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

连接docker是指连接docker的ssh吗 #9

Closed
LzxUser opened this issue Mar 28, 2019 · 2 comments
Closed

连接docker是指连接docker的ssh吗 #9

LzxUser opened this issue Mar 28, 2019 · 2 comments

Comments

@LzxUser
Copy link

LzxUser commented Mar 28, 2019

No description provided.

@zyupo
Copy link
Member

zyupo commented Mar 28, 2019

这里是指运维平台通过Docker端口调用服务器上Docker API接口的地址,需要在服务器上面为docker服务配置一个端口。
在使用前,需要你先修改docker配置文件,为Docker配置远程调用端口。

  • 方案1:
shell> vim /usr/lib/systemd/system/docker.service

ExecStart=/usr/bin/dockerd
修改为:
ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375
  • 方案2:
shell> vim /etc/sysconfig/docker
OPTIONS='--selinux-enabled --log-driver=journald  --signature-verification=false
改为:
OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375'

修改完docker启动端口后,在平台上docker地址,就可以 服务器内网IP:2375(192.168.1.1:2375)
后面会改进这里也会及时完善文档。

@LzxUser
Copy link
Author

LzxUser commented Mar 29, 2019

明白了

@LzxUser LzxUser closed this as completed Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants