这是一个创建于 3066 天前的主题,其中的信息可能已经有所发展或是发生改变。
swarm 内大概是这样,
nodes: 3
node1: 10.10.10.11:2375
└ ID: IIOY:F3OZ:GTSR:3LBP:5EK3:6D5W:HFJ2:ICNU:XHYC:H3BP:WXHY:NU7U
└ Status: Healthy
└ Containers: 5
└ Reserved CPUs: 0 / 12
└ Reserved Memory: 0 B / 32.87 GiB
└ Labels: executiondriver=native-0.2, kernelversion=2.6.32-431.el6.x86_64, operatingsystem=, storagedriver=devicemapper
└ UpdatedAt: 2016-07-04T14:20:41Z
└ ServerVersion: 1.7.1
node2: 10.10.10.12:2375
└ ID: 7DV6:4RGK:2MGA:PIAJ:BS6I:MDVP:5QZH:PB52:EZIT:W66L:3VQV:WOOR
└ Status: Healthy
└ Containers: 4
└ Reserved CPUs: 0 / 12
└ Reserved Memory: 0 B / 32.87 GiB
└ Labels: executiondriver=native-0.2, kernelversion=2.6.32-431.el6.x86_64, operatingsystem=, storagedriver=devicemapper
└ UpdatedAt: 2016-07-04T14:21:05Z
└ ServerVersion: 1.7.1
node3: 10.10.10.13:2375
└ ID: LB22:OEIO:7QSN:PZOQ:FFKD:AD4V:Q6ON:IAA7:7T4V:E3XX:RLYR:5TEO
└ Status: Healthy
└ Containers: 5
└ Reserved CPUs: 0 / 12
└ Reserved Memory: 0 B / 32.87 GiB
└ Labels: executiondriver=native-0.2, kernelversion=2.6.32-431.el6.x86_64, operatingsystem=, storagedriver=devicemapper
└ UpdatedAt: 2016-07-04T14:20:56Z
└ ServerVersion: 1.7.1
Kernel Version: 2.6.32-431.el6.x86_64
Operating System: linux
CPUs: 36
Total Memory: 98.62 GiB
现在通过 swarm 新建一个容器,会被分配一个内网 ip ,类似 10.10.10.11:12345 ,但是我想通过 swarm 的 manager 的公网 ip 来访问这个容器。
请问能否在新建容器时就完成这种操作?还是我只能自己在 manager 上做端口转发?
谢谢