fix docker port allocation?

This commit is contained in:
Antonio Fernández 2015-11-19 19:15:25 +01:00
parent f277862881
commit 581245f881
1 changed files with 2 additions and 1 deletions

View File

@ -275,7 +275,8 @@ func (d *DockerDriver) createContainer(ctx *ExecContext, task *structs.Task, dri
}
hostPortStr := strconv.Itoa(port.Value)
containerPort := docker.Port(hostPortStr)
// containerPort := docker.Port(hostPortStr)
containerPort := docker.Port(strconv.Itoa(containerPortInt))
publishedPorts[containerPort+"/tcp"] = []docker.PortBinding{docker.PortBinding{HostIP: network.IP, HostPort: hostPortStr}}
publishedPorts[containerPort+"/udp"] = []docker.PortBinding{docker.PortBinding{HostIP: network.IP, HostPort: hostPortStr}}