问题描述
我正在尝试将容器部署到docker swarm集群(docker引擎1.12.1)。
I'm trying to deploy my container to docker swarm cluster(docker engine 1.12.1).
docker swarm模式的功能 >确实令人兴奋,例如群集docker,多主机网络。
The features of docker swarm mode really are exciting, such as clustering docker, multi-host networking.
但是,到目前为止,我发现无法以集群模式进行存档( docker 1.12 .x ),在使用 docker run
启动容器时效果很好。
However I find something can't be archived in swarm mode so far(docker 1.12.x), which works well when using docker run
to start container.
我的主机有 eth0 用于Intranet网络, eth1 用于Internet网络。我只想发布由 docker service create
在Intranet网络上部署的服务。但是在通过 docker service create --name my_web --publish 8000:80 my_web_image eth0 和 eth1 接口。 / code>。
My host has eth0 for Intranet network, eth1 for Internet network. I would like to only publish the service deployed by docker service create
on Intranet network. But the service would listen both eth0 and eth1 interfaces after creating the service via docker service create --name my_web --publish 8000:80 my_web_image
.
任何仅在 eth0 界面上监听 my_web 服务的解决方案/解决方法
Any solution/workaround to archive the my_web service only listening on eth0 interface?
推荐答案
不幸的是,目前看来这是。
Unfortunately, it seems like this is currently not supported.
这篇关于如何在docker swarm模式下将发布的端口绑定到特定的eth [x]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!