1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-24 09:18:08 +00:00

Merge pull request #2416 from GNS3/bugfix/2414

Run Docker containers with user namespaces enabled
This commit is contained in:
Jeremy Grossmann 2024-09-19 11:01:11 +07:00 committed by GitHub
commit 1f09a3e6bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 0 deletions

View File

@ -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": [],

View File

@ -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",