mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-07-29 05:22:00 +08:00

When using `DockerRun.sh` stale containers were left over after closing the application. These containers would also not be re-used. Add the `--rm` flag to make Docker delete the containers after running the application, since they are re-created for each run anyways.
28 lines
1.0 KiB
Bash
Executable File
28 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
set -x
|
|
# Just in case, here's some other things that might help:
|
|
# Force the container's hostname to be the same as your workstation
|
|
# -h $HOSTNAME \
|
|
# If there's problems with the X display, try this
|
|
# -v /tmp/.X11-unix:/tmp/.X11-unix \
|
|
docker run \
|
|
`# Use the hosts networking. Printer wifi and also dbus communication` \
|
|
--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 \
|
|
`# Bind mount your home directory into the container for loading/saving files` \
|
|
-v $HOME:/home/$USER \
|
|
`# Pass the X display number to the container` \
|
|
-e DISPLAY=$DISPLAY \
|
|
`# It seems that libGL and dbus things need privileged mode` \
|
|
--privileged=true \
|
|
`# Attach tty for running bambu with command line things` \
|
|
-ti \
|
|
`# Remove container when it is finished` \
|
|
--rm \
|
|
`# Pass all parameters from this script to the bambu ENTRYPOINT binary` \
|
|
bambustudio $*
|
|
|