diff --git a/gns3server/compute/docker/docker_vm.py b/gns3server/compute/docker/docker_vm.py index bb94816e..fff4e435 100644 --- a/gns3server/compute/docker/docker_vm.py +++ b/gns3server/compute/docker/docker_vm.py @@ -384,6 +384,7 @@ class DockerVM(BaseNode): "Privileged": True, "Binds": self._mount_binds(image_infos), }, + "UsernsMode": "host", "Volumes": {}, "Env": ["container=docker"], # Systemd compliant: https://github.com/GNS3/gns3-server/issues/573 "Cmd": [], diff --git a/tests/compute/docker/test_docker_vm.py b/tests/compute/docker/test_docker_vm.py index 8519f56d..3afea049 100644 --- a/tests/compute/docker/test_docker_vm.py +++ b/tests/compute/docker/test_docker_vm.py @@ -109,6 +109,7 @@ async def test_create(compute_project, manager): ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "NetworkDisabled": True, "Hostname": "test", @@ -147,6 +148,7 @@ async def test_create_with_tag(compute_project, manager): ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "NetworkDisabled": True, "Hostname": "test", @@ -189,6 +191,7 @@ async def test_create_vnc(compute_project, manager): ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "NetworkDisabled": True, "Hostname": "test", @@ -318,6 +321,7 @@ async def test_create_start_cmd(compute_project, manager): ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "Entrypoint": ["/gns3/init.sh"], "Cmd": ["/bin/ls"], @@ -416,6 +420,7 @@ async def test_create_image_not_available(compute_project, manager): ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "NetworkDisabled": True, "Hostname": "test", @@ -459,6 +464,7 @@ async def test_create_with_user(compute_project, manager): ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "NetworkDisabled": True, "Hostname": "test", @@ -542,6 +548,7 @@ async def test_create_with_extra_volumes_duplicate_1_image(compute_project, mana ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "NetworkDisabled": True, "Hostname": "test", @@ -581,6 +588,7 @@ async def test_create_with_extra_volumes_duplicate_2_user(compute_project, manag ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "NetworkDisabled": True, "Hostname": "test", @@ -620,6 +628,7 @@ async def test_create_with_extra_volumes_duplicate_3_subdir(compute_project, man ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "NetworkDisabled": True, "Hostname": "test", @@ -659,6 +668,7 @@ async def test_create_with_extra_volumes_duplicate_4_backslash(compute_project, ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "NetworkDisabled": True, "Hostname": "test", @@ -697,6 +707,7 @@ async def test_create_with_extra_volumes_duplicate_5_subdir_issue_1595(compute_p ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "NetworkDisabled": True, "Hostname": "test", @@ -735,6 +746,7 @@ async def test_create_with_extra_volumes_duplicate_6_subdir_issue_1595(compute_p ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "NetworkDisabled": True, "Hostname": "test", @@ -781,6 +793,7 @@ async def test_create_with_extra_volumes(compute_project, manager): ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "NetworkDisabled": True, "Hostname": "test", @@ -1029,6 +1042,7 @@ async def test_update(vm): ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "NetworkDisabled": True, "Hostname": "test", @@ -1097,6 +1111,7 @@ async def test_update_running(vm): ], "Privileged": True }, + "UsernsMode": "host", "Volumes": {}, "NetworkDisabled": True, "Hostname": "test",