diff --git a/client/driver/docker.go b/client/driver/docker.go index 4aa97e13b..7c469c7be 100644 --- a/client/driver/docker.go +++ b/client/driver/docker.go @@ -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}}