Skip to content

Commit

Permalink
fix docker port allocation?
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Fernández committed Nov 19, 2015
1 parent 813590c commit fde90ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/driver/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down

0 comments on commit fde90ca

Please sign in to comment.