update DockeRun to match with lastest run suggestions

This commit is contained in:
PatrickChenHZ 2025-01-23 11:53:01 -06:00 committed by Lane.Wei
parent 835d619a90
commit b835c40b20
1 changed files with 5 additions and 11 deletions

View File

@ -9,25 +9,20 @@ set -x
# -v $HOME/.Xauthority:/root/.Xauthority \ # -v $HOME/.Xauthority:/root/.Xauthority \
# You also need to run "xhost +" on your host system # You also need to run "xhost +" on your host system
# Bambu Studio also require the parent directory for the configuration directory to be present to start # Bambu Studio also require the parent directory for the configuration directory to be present to start
# which means it is important to make sure user is passed to container correctly # to prevent your local machines's bambu studio config passed to docker container when you map your home directory, add:
# if the following configuration does not work with error: "boost::filesystem::create_directory: No such file or directory" # -v :SHOME/.config/BambuStudio
# try replacing -u line with set -x
# -u $(id -u ${USER}):$(id -g ${USER}) \
# and add
# -e HOME=/home/$USER \
docker run \ docker run \
`# Use the hosts networking. Printer wifi and also dbus communication` \ `# Use the hosts networking. Printer wifi and also dbus communication` \
--net=host \ --net=host \
`# Some X installs will not have permissions to talk to sockets for shared memory` \ `# Some X installs will not have permissions to talk to sockets for shared memory` \
--ipc host \ --ipc host \
`# Run as your workstations username to keep permissions the same` \
-u $USER \
`# Bind mount your home directory into the container for loading/saving files` \ `# Bind mount your home directory into the container for loading/saving files` \
-v $HOME:$HOME \ -v $HOME:$HOME \
`# Pass some X Auth file to allow x11 to connect to your host x instance` \
-v $HOME/.Xauthority:/tmp/.Xauthority \ -v $HOME/.Xauthority:/tmp/.Xauthority \
-v /tmp/.X11-unix:/tmp/.X11-unix \ -v /tmp/.X11-unix:/tmp/.X11-unix \
-e XAUTHORITY=/tmp/.Xauthority \ -e XAUTHORITY=/tmp/.Xauthority \
-u $(id -u ${USER}):$(id -g ${USER}) \
`# Pass the X display number to the container` \ `# Pass the X display number to the container` \
-e DISPLAY=$DISPLAY \ -e DISPLAY=$DISPLAY \
`# It seems that libGL and dbus things need privileged mode` \ `# It seems that libGL and dbus things need privileged mode` \
@ -37,5 +32,4 @@ docker run \
`# Remove container when it is finished` \ `# Remove container when it is finished` \
--rm \ --rm \
`# Pass all parameters from this script to the bambu ENTRYPOINT binary` \ `# Pass all parameters from this script to the bambu ENTRYPOINT binary` \
bambustudio $* bambu_studio_yes_args $*