Fix port binding of swarm master

The port is 3376 by default but could be modified by --swarm-host
option.

Signed-off-by: Yi EungJun <eungjun.yi@navercorp.com>
This commit is contained in:
Yi EungJun
2016-05-11 17:33:18 +09:00
parent c120a925f3
commit d74f273c53

View File

@@ -86,7 +86,7 @@ func configureSwarm(p Provisioner, swarmOptions swarm.Options, authOptions auth.
},
Binds: []string{hostBind},
PortBindings: map[string][]dockerclient.PortBinding{
"3376/tcp": {
fmt.Sprintf("%s/tcp", port): {
{
HostIp: "0.0.0.0",
HostPort: port,
@@ -99,8 +99,8 @@ func configureSwarm(p Provisioner, swarmOptions swarm.Options, authOptions auth.
Image: swarmOptions.Image,
Env: swarmOptions.Env,
ExposedPorts: map[string]struct{}{
"2375/tcp": {},
"3376/tcp": {},
"2375/tcp": {},
fmt.Sprintf("%s/tcp", port): {},
},
Cmd: cmdMaster,
HostConfig: masterHostConfig,