You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Podman: --userns=keep-id and --security-opt label=disable are never applied on the Docker Compose path #1300
getPodmanArgs() — which adds --security-opt label=disable and, for a non-root remoteUser, --userns=keep-id — lives in src/spec-node/singleContainer.ts and is typed to DevContainerFromDockerfileConfig | DevContainerFromImageConfig. src/spec-node/dockerCompose.ts contains no podman handling at all, so a compose-based dev container on rootless podman gets neither flag.
Result: with rootless podman, the host user maps to container root, so a workspace bind mount appears as root:0 inside and the non-root remoteUser cannot write to it.
Reproduction
devcontainer CLI 0.87.0, podman 5.8.2 rootless, Linux. Two configs differing only in single-container vs compose, both "remoteUser": "vscode", same base image.
The compose path should apply the same podman handling as the single-container path — emitting the flags into the generated docker-compose.devcontainer.*.yml override (userns_mode, security_opt) for the primary service.
Related but different
#1004 / #1018 (omit keep-id for root) and #1284 / #1285 (derive the mapping from the remote user's real UID/GID) all concern howgetPodmanArgs should behave. This is that the compose path never calls it. Whatever #1285 settles for the mapping should presumably apply to both paths.
Confirming with Dev Containers CLI 0.90.0, rootless Podman 5.8.9 and Docker Compose 5.6.0 (aarch64 and x86_64): with a non-root remote user the bind-mounted workspace is root:0 inside and writes fail.
Suggested fix: in the generated Compose override, add userns_mode: keep-id to the dev container's service under the same conditions as the image-based --userns=keep-id (Podman, Linux, remote user not root), unless the Compose files already set userns_mode. Workaround meanwhile: userns_mode: "keep-id" in the service. Happy to test a fix.
Activity
cnexstudio commentedon Oct 30, 2026
Confirming with Dev Containers CLI 0.90.0, rootless Podman 5.8.9 and Docker Compose 5.6.0 (aarch64 and x86_64): with a non-root remote user the bind-mounted workspace is
root:0inside and writes fail.Suggested fix: in the generated Compose override, add
userns_mode: keep-idto the dev container's service under the same conditions as the image-based--userns=keep-id(Podman, Linux, remote user not root), unless the Compose files already setuserns_mode. Workaround meanwhile:userns_mode: "keep-id"in the service. Happy to test a fix.bam80 commentedon Nov 1, 2026
CC: Christof Marti (@chrmarti)