fix: make Docker container UID/GID configurable

Add UID and GID build arguments to Dockerfiles to allow matching the
container user to the host user. This fixes file permission issues when
mounting host directories as volumes.

Default remains 1001 for backward compatibility. To match host user:
  UID=$(id -u) GID=$(id -g) docker-compose build

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Tobias Weber
2026-01-12 16:11:57 +01:00
parent 299b838400
commit aa8caeaeb0
6 changed files with 51 additions and 5 deletions

View File

@@ -17,6 +17,11 @@ services:
build:
context: .
dockerfile: Dockerfile.dev
args:
# Match container user to host user for mounted volume permissions
# Override with: UID=$(id -u) GID=$(id -g) docker-compose build
UID: ${UID:-1001}
GID: ${GID:-1001}
container_name: automaker-dev-server-only
restart: unless-stopped
ports: