1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-29 02:08:10 +00:00

Pass by default the environment variable container=docker

Fix #573
This commit is contained in:
Julien Duponchelle 2016-06-15 10:12:32 +02:00
parent 049c348709
commit 43a3584a5c
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8
2 changed files with 9 additions and 1 deletions

View File

@ -275,7 +275,7 @@ class DockerVM(BaseVM):
"Binds": self._mount_binds(image_infos)
},
"Volumes": {},
"Env": [],
"Env": ["container=docker"], # Systemd compliant: https://github.com/GNS3/gns3-server/issues/573
"Cmd": [],
"Entrypoint": image_infos.get("Config", {"Entrypoint": []})["Entrypoint"]
}

View File

@ -104,6 +104,7 @@ def test_create(loop, project, manager):
"Hostname": "test",
"Image": "ubuntu:latest",
"Env": [
"container=docker",
"GNS3_MAX_ETHERNET=eth0",
"GNS3_VOLUMES=/etc/network"
],
@ -142,6 +143,7 @@ def test_create_with_tag(loop, project, manager):
"Hostname": "test",
"Image": "ubuntu:latest:16.04",
"Env": [
"container=docker",
"GNS3_MAX_ETHERNET=eth0",
"GNS3_VOLUMES=/etc/network"
],
@ -184,6 +186,7 @@ def test_create_vnc(loop, project, manager):
"Hostname": "test",
"Image": "ubuntu:latest",
"Env": [
"container=docker",
"GNS3_MAX_ETHERNET=eth0",
"GNS3_VOLUMES=/etc/network",
"DISPLAY=:42"
@ -228,6 +231,7 @@ def test_create_start_cmd(loop, project, manager):
"Hostname": "test",
"Image": "ubuntu:latest",
"Env": [
"container=docker",
"GNS3_MAX_ETHERNET=eth0",
"GNS3_VOLUMES=/etc/network"
]
@ -260,6 +264,7 @@ def test_create_environment(loop, project, manager):
"Privileged": True
},
"Env": [
"container=docker",
"GNS3_MAX_ETHERNET=eth0",
"GNS3_VOLUMES=/etc/network",
"YES=1",
@ -320,6 +325,7 @@ def test_create_image_not_available(loop, project, manager):
"Hostname": "test",
"Image": "ubuntu:latest",
"Env": [
"container=docker",
"GNS3_MAX_ETHERNET=eth0",
"GNS3_VOLUMES=/etc/network"
],
@ -540,6 +546,7 @@ def test_update(loop, vm):
"Hostname": "test",
"Image": "ubuntu:latest",
"Env": [
"container=docker",
"GNS3_MAX_ETHERNET=eth0",
"GNS3_VOLUMES=/etc/network"
],
@ -608,6 +615,7 @@ def test_update_running(loop, vm):
"Hostname": "test",
"Image": "ubuntu:latest",
"Env": [
"container=docker",
"GNS3_MAX_ETHERNET=eth0",
"GNS3_VOLUMES=/etc/network"
],