mirror of
https://git-proxy.hk.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-04-10 14:19:12 +08:00
fix docker build
This commit is contained in:
parent
70931e5321
commit
671d3d8f70
16
Dockerfile
16
Dockerfile
@ -40,7 +40,7 @@ RUN apt-get update && apt-get install -y \
|
||||
libtool \
|
||||
libudev-dev \
|
||||
libwayland-dev \
|
||||
libwebkit2gtk-4.0-dev \
|
||||
libwebkit2gtk-4.1-dev \
|
||||
libxkbcommon-dev \
|
||||
locales \
|
||||
locales-all \
|
||||
@ -86,10 +86,16 @@ SHELL ["/bin/bash", "-l", "-c"]
|
||||
ARG USER=root
|
||||
ARG UID=0
|
||||
ARG GID=0
|
||||
RUN [[ "$UID" != "0" ]] \
|
||||
&& groupadd -f -g $GID $USER \
|
||||
&& useradd -u $UID -g $GID $USER
|
||||
|
||||
RUN if [[ "$UID" != "0" ]]; then \
|
||||
# Create group if it doesn't exist \
|
||||
groupadd -f -g $GID $USER; \
|
||||
# Check if user with this UID already exists \
|
||||
if getent passwd $UID > /dev/null 2>&1; then \
|
||||
echo "User with UID $UID already exists, skipping user creation"; \
|
||||
else \
|
||||
useradd -u $UID -g $GID $USER; \
|
||||
fi \
|
||||
fi
|
||||
# Using an entrypoint instead of CMD because the binary
|
||||
# accepts several command line arguments.
|
||||
ENTRYPOINT ["/OrcaSlicer/build/package/bin/orca-slicer"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user