Skip to content

Support configurable container user for dev containers (Linux/WSL2 file permissions) #14962

@jaredlockhart

Description

@jaredlockhart

Problem

The dev containers in docker-compose.yml all run as root. On macOS this is fine because Docker Desktop's VM transparently handles UID translation for bind mounts. However, on Linux and Windows/WSL2, files created by root inside the container are owned by root on the host filesystem, causing permission issues for developers.

Proposed Solution

Add a DOCKER_USER variable to the dev services in docker-compose.yml that defaults to empty (preserving current root behavior for macOS and CI), but can be set in .env by Linux/WSL2 developers:

services:
  experimenter:
    user: "${DOCKER_USER:-}"
# .env (Linux/WSL2 only)
DOCKER_USER=1000:1000

This is a zero-impact change for macOS developers and CI — an empty user: field is ignored by Docker Compose.

┆Issue is synchronized with this Jira Task

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions