mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 03:08:14 +00:00
Fix for running Docker containers with user namespaces enabled
This commit is contained in:
parent
8429494280
commit
22f022cc22
@ -384,6 +384,7 @@ class DockerVM(BaseNode):
|
|||||||
"Privileged": True,
|
"Privileged": True,
|
||||||
"Binds": self._mount_binds(image_infos),
|
"Binds": self._mount_binds(image_infos),
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"Env": ["container=docker"], # Systemd compliant: https://github.com/GNS3/gns3-server/issues/573
|
"Env": ["container=docker"], # Systemd compliant: https://github.com/GNS3/gns3-server/issues/573
|
||||||
"Cmd": [],
|
"Cmd": [],
|
||||||
|
@ -109,6 +109,7 @@ async def test_create(compute_project, manager):
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"NetworkDisabled": True,
|
"NetworkDisabled": True,
|
||||||
"Hostname": "test",
|
"Hostname": "test",
|
||||||
@ -147,6 +148,7 @@ async def test_create_with_tag(compute_project, manager):
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"NetworkDisabled": True,
|
"NetworkDisabled": True,
|
||||||
"Hostname": "test",
|
"Hostname": "test",
|
||||||
@ -189,6 +191,7 @@ async def test_create_vnc(compute_project, manager):
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"NetworkDisabled": True,
|
"NetworkDisabled": True,
|
||||||
"Hostname": "test",
|
"Hostname": "test",
|
||||||
@ -318,6 +321,7 @@ async def test_create_start_cmd(compute_project, manager):
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"Entrypoint": ["/gns3/init.sh"],
|
"Entrypoint": ["/gns3/init.sh"],
|
||||||
"Cmd": ["/bin/ls"],
|
"Cmd": ["/bin/ls"],
|
||||||
@ -416,6 +420,7 @@ async def test_create_image_not_available(compute_project, manager):
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"NetworkDisabled": True,
|
"NetworkDisabled": True,
|
||||||
"Hostname": "test",
|
"Hostname": "test",
|
||||||
@ -459,6 +464,7 @@ async def test_create_with_user(compute_project, manager):
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"NetworkDisabled": True,
|
"NetworkDisabled": True,
|
||||||
"Hostname": "test",
|
"Hostname": "test",
|
||||||
@ -542,6 +548,7 @@ async def test_create_with_extra_volumes_duplicate_1_image(compute_project, mana
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"NetworkDisabled": True,
|
"NetworkDisabled": True,
|
||||||
"Hostname": "test",
|
"Hostname": "test",
|
||||||
@ -581,6 +588,7 @@ async def test_create_with_extra_volumes_duplicate_2_user(compute_project, manag
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"NetworkDisabled": True,
|
"NetworkDisabled": True,
|
||||||
"Hostname": "test",
|
"Hostname": "test",
|
||||||
@ -620,6 +628,7 @@ async def test_create_with_extra_volumes_duplicate_3_subdir(compute_project, man
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"NetworkDisabled": True,
|
"NetworkDisabled": True,
|
||||||
"Hostname": "test",
|
"Hostname": "test",
|
||||||
@ -659,6 +668,7 @@ async def test_create_with_extra_volumes_duplicate_4_backslash(compute_project,
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"NetworkDisabled": True,
|
"NetworkDisabled": True,
|
||||||
"Hostname": "test",
|
"Hostname": "test",
|
||||||
@ -697,6 +707,7 @@ async def test_create_with_extra_volumes_duplicate_5_subdir_issue_1595(compute_p
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"NetworkDisabled": True,
|
"NetworkDisabled": True,
|
||||||
"Hostname": "test",
|
"Hostname": "test",
|
||||||
@ -735,6 +746,7 @@ async def test_create_with_extra_volumes_duplicate_6_subdir_issue_1595(compute_p
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"NetworkDisabled": True,
|
"NetworkDisabled": True,
|
||||||
"Hostname": "test",
|
"Hostname": "test",
|
||||||
@ -781,6 +793,7 @@ async def test_create_with_extra_volumes(compute_project, manager):
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"NetworkDisabled": True,
|
"NetworkDisabled": True,
|
||||||
"Hostname": "test",
|
"Hostname": "test",
|
||||||
@ -1029,6 +1042,7 @@ async def test_update(vm):
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"NetworkDisabled": True,
|
"NetworkDisabled": True,
|
||||||
"Hostname": "test",
|
"Hostname": "test",
|
||||||
@ -1097,6 +1111,7 @@ async def test_update_running(vm):
|
|||||||
],
|
],
|
||||||
"Privileged": True
|
"Privileged": True
|
||||||
},
|
},
|
||||||
|
"UsernsMode": "host",
|
||||||
"Volumes": {},
|
"Volumes": {},
|
||||||
"NetworkDisabled": True,
|
"NetworkDisabled": True,
|
||||||
"Hostname": "test",
|
"Hostname": "test",
|
||||||
|
Loading…
Reference in New Issue
Block a user