Skip to content

Commit

Permalink
Merge pull request #2416 from GNS3/bugfix/2414
Browse files Browse the repository at this point in the history
Run Docker containers with user namespaces enabled
  • Loading branch information
grossmj authored Sep 19, 2024
2 parents 8429494 + 22f022c commit 1f09a3e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions gns3server/compute/docker/docker_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ async def create(self):
"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": [],
Expand Down
15 changes: 15 additions & 0 deletions tests/compute/docker/test_docker_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ async def test_create(compute_project, manager):
],
"Privileged": True
},
"UsernsMode": "host",
"Volumes": {},
"NetworkDisabled": True,
"Hostname": "test",
Expand Down Expand Up @@ -147,6 +148,7 @@ async def test_create_with_tag(compute_project, manager):
],
"Privileged": True
},
"UsernsMode": "host",
"Volumes": {},
"NetworkDisabled": True,
"Hostname": "test",
Expand Down Expand Up @@ -189,6 +191,7 @@ async def test_create_vnc(compute_project, manager):
],
"Privileged": True
},
"UsernsMode": "host",
"Volumes": {},
"NetworkDisabled": True,
"Hostname": "test",
Expand Down Expand Up @@ -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"],
Expand Down Expand Up @@ -416,6 +420,7 @@ async def information():
],
"Privileged": True
},
"UsernsMode": "host",
"Volumes": {},
"NetworkDisabled": True,
"Hostname": "test",
Expand Down Expand Up @@ -459,6 +464,7 @@ async def test_create_with_user(compute_project, manager):
],
"Privileged": True
},
"UsernsMode": "host",
"Volumes": {},
"NetworkDisabled": True,
"Hostname": "test",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -781,6 +793,7 @@ async def test_create_with_extra_volumes(compute_project, manager):
],
"Privileged": True
},
"UsernsMode": "host",
"Volumes": {},
"NetworkDisabled": True,
"Hostname": "test",
Expand Down Expand Up @@ -1029,6 +1042,7 @@ async def test_update(vm):
],
"Privileged": True
},
"UsernsMode": "host",
"Volumes": {},
"NetworkDisabled": True,
"Hostname": "test",
Expand Down Expand Up @@ -1097,6 +1111,7 @@ async def test_update_running(vm):
],
"Privileged": True
},
"UsernsMode": "host",
"Volumes": {},
"NetworkDisabled": True,
"Hostname": "test",
Expand Down

0 comments on commit 1f09a3e

Please sign in to comment.