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.
This commit is contained in:
Boris Samorodov
2026-10-13 11:57:16 -05:00
committed by GitHub
parent 1591423f91
commit 008ee792f6
+5 -2
View File
@@ -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` \