From 008ee792f699f0633e12cf7c34a9ebb2e23775b1 Mon Sep 17 00:00:00 2001 From: Boris Samorodov Date: Tue, 13 Oct 2026 18:57:16 +0200 Subject: [PATCH] Fix DockerRun.sh failing when the host UID already exists in the image (#16373) The ubuntu:24.04 base image has a built-in ubuntu user with UID 1000, so the Dockerfile skips creating the host user and `docker run -u "$USER"` cannot find it. Run the container with the numeric UID and GID instead, and set HOME and the working directory to the bind-mounted home. --- scripts/DockerRun.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/DockerRun.sh b/scripts/DockerRun.sh index 07c85df922..808107f721 100755 --- a/scripts/DockerRun.sh +++ b/scripts/DockerRun.sh @@ -12,8 +12,11 @@ docker run \ --net=host \ `# Some X installs will not have permissions to talk to sockets for shared memory` \ --ipc host \ - `# Run as your workstations username to keep permissions the same` \ - -u "$USER" \ + `# Run as your workstations UID and GID to keep permissions the same.` \ + `# Numeric IDs work even when the image has no user with your name` \ + -u "$(id -u):$(id -g)" \ + -e HOME="/home/$USER" \ + -w "/home/$USER" \ `# Bind mount your home directory into the container for loading/saving files` \ -v "$HOME:/home/$USER" \ `# Pass the X display number to the container` \