From d9e7db2b5c691f49e5e3d8e37b67930c6e9e6ee4 Mon Sep 17 00:00:00 2001 From: Vylyne <94922829+Vylyne@users.noreply.github.com> Date: Wed, 1 Oct 2025 14:02:54 -0400 Subject: [PATCH] Added Global Definition of PUID and GUID for ease of management only. --- Dockerfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index d55d565b3..07e64939a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,9 @@ +# globally defining Arguments and Defaults ARG NUSQLITE3_DIR="/usr/local/lib/nusqlite3" ARG NUSQLITE3_PATH="${NUSQLITE3_DIR}/libnusqlite3.so" +# default Process user id and group id +ARG PUID=1000 +ARG PGID=1000 ### STAGE 0: Build client ### FROM node:20-alpine AS build-client @@ -45,8 +49,8 @@ FROM node:20-alpine ARG NUSQLITE3_DIR ARG NUSQLITE3_PATH -ARG PUID=1000 -ARG PGID=1000 +ARG PUID +ARG PGID # Install only runtime dependencies RUN apk add --no-cache --update \ @@ -59,14 +63,14 @@ RUN apk add --no-cache --update \ && apk del shadow \ && mkdir -p /config /metadata \ && chown -R audiobookshelf:audiobookshelf /config /metadata \ - && chmod u=rwx,go=rw /config /metadata + && chmod a=rws /config /metadata WORKDIR /app # Copy compiled frontend and server from build stages -COPY --from=build-client /client/dist /app/client/dist -COPY --from=build-server /server /app -COPY --from=build-server ${NUSQLITE3_PATH} ${NUSQLITE3_PATH} +COPY --chmod=755 --from=build-client /client/dist /app/client/dist +COPY --chmod=755 --from=build-server /server /app +COPY --chmod=755 --from=build-server ${NUSQLITE3_PATH} ${NUSQLITE3_PATH} EXPOSE 80