mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 19:35:41 +03:00
docker: support group allocated ports and host_networks (#8623)
* docker: support group allocated ports * docker: add new ports driver config to specify which group ports are mapped * docker: update port mapping docs
This commit is contained in:
@@ -936,6 +936,7 @@ func (tr *TaskRunner) buildTaskConfig() *drivers.TaskConfig {
|
||||
alloc := tr.Alloc()
|
||||
invocationid := uuid.Generate()[:8]
|
||||
taskResources := tr.taskResources
|
||||
ports := tr.Alloc().AllocatedResources.Shared.Ports
|
||||
env := tr.envBuilder.Build()
|
||||
tr.networkIsolationLock.Lock()
|
||||
defer tr.networkIsolationLock.Unlock()
|
||||
@@ -964,6 +965,7 @@ func (tr *TaskRunner) buildTaskConfig() *drivers.TaskConfig {
|
||||
CPUShares: taskResources.Cpu.CpuShares,
|
||||
PercentTicks: float64(taskResources.Cpu.CpuShares) / float64(tr.clientConfig.Node.NodeResources.Cpu.CpuShares),
|
||||
},
|
||||
Ports: &ports,
|
||||
},
|
||||
Devices: tr.hookResources.getDevices(),
|
||||
Mounts: tr.hookResources.getMounts(),
|
||||
|
||||
Reference in New Issue
Block a user