Skip to content

Commit

Permalink
Merge pull request #466 from fernandezvara/fix-docker-port-mappings
Browse files Browse the repository at this point in the history
docker port allocation not mapping correctly
  • Loading branch information
cbednarski committed Nov 19, 2015
2 parents 82bfeb6 + fde90ca commit 5ecb499
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 5ecb499

Please sign in to comment.