mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-14 03:11:19 +00:00
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:
@@ -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` \
|
||||
|
||||
Reference in New Issue
Block a user