Add comment about rootful Docker permissions at container start

Rootful Docker recreates volume mount points as root on start,
preventing the GNS3 process from writing files into node directories
while the container is running. self._fix_permissions() would resolve
this but is currently only called at container stop time.
This commit is contained in:
YueGuobin 2026-06-10 00:46:10 +08:00
parent ce95c89b64
commit 066b7076c0
No known key found for this signature in database

View File

@ -669,6 +669,12 @@ class DockerVM(BaseNode):
await self.manager.query("POST", f"containers/{self._cid}/start")
await asyncio.sleep(0.5) # give the Docker container some time to start
# Fix host-side directory ownership after Docker (re)creates
# volume mount points as root (rootful Docker only).
# This allows the GNS3 process to write files into node directories
# while the container is running. Permissions are recorded and
# restored inside the container by init.sh on next startup.
# await self._fix_permissions()
self._namespace = await self._get_namespace()
await self._start_ubridge(require_privileged_access=True)