Hi,
When I POST the below JSON to /v1/jobs, the container fails to start and /var/log/messages contains the following lines:
Nov 22 01:01:17 localhost nomad: 2015/11/22 01:01:17 [DEBUG] driver.docker: networking mode not specified; defaulting to bridge
Nov 22 01:01:17 localhost nomad: 2015/11/22 01:01:17 [DEBUG] driver.docker: No network interfaces are available
Nov 22 01:01:17 localhost nomad: 2015/11/22 01:01:17 [ERR] driver.docker: failed to create container configuration for image registry:2: Trying to map ports but no network interface is available
Nov 22 01:01:17 localhost nomad: 2015/11/22 01:01:17 [ERR] client: failed to start task 'docker-registry-2' for alloc 'b9b26630-7a08-d246-ec90-bd576e892f09': Failed to create container configuration for image registry:2: Trying to map ports but no network interface is available
If I omit the "port_map" property from the task config, the container starts fine. Any idea what's going on?
Cheers,
Stef
{
"Job": {
"ID" : "docker-registry-2",
"Region" : "global",
"Type" : "service",
"Priority" : 1,
"Datacenters": [
"dc1"
],
"Name": "docker-registry-2",
"TaskGroups": [
{
"Count" : 1,
"Name": "docker-registry-2",
"RestartPolicy" : {
"Attempts" : 10
},
"Tasks": [
{
"Name": "docker-registry-2",
"Driver": "docker",
"Port" : {
"http" : {
"static" : 5000
}
},
"Service": {
"Port": "http"
},
"Config": {
"image": "registry:2",
"port_map" : [{ "http" : 5000 }]
},
"Resources": {
"CPU" : 500,
"MemoryMB" : 128,
"DiskMB" : 0,
"Network": {
"MBits" : 100,
"Reserved_Ports": [
"5000"
]
}
}
}
]
}
]
}
}