mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-11-24 20:05:41 +01:00
Added Global Definition of PUID and GUID for ease of management only.
This commit is contained in:
parent
ce1540e781
commit
d9e7db2b5c
16
Dockerfile
16
Dockerfile
@ -1,5 +1,9 @@
|
|||||||
|
# globally defining Arguments and Defaults
|
||||||
ARG NUSQLITE3_DIR="/usr/local/lib/nusqlite3"
|
ARG NUSQLITE3_DIR="/usr/local/lib/nusqlite3"
|
||||||
ARG NUSQLITE3_PATH="${NUSQLITE3_DIR}/libnusqlite3.so"
|
ARG NUSQLITE3_PATH="${NUSQLITE3_DIR}/libnusqlite3.so"
|
||||||
|
# default Process user id and group id
|
||||||
|
ARG PUID=1000
|
||||||
|
ARG PGID=1000
|
||||||
|
|
||||||
### STAGE 0: Build client ###
|
### STAGE 0: Build client ###
|
||||||
FROM node:20-alpine AS build-client
|
FROM node:20-alpine AS build-client
|
||||||
@ -45,8 +49,8 @@ FROM node:20-alpine
|
|||||||
|
|
||||||
ARG NUSQLITE3_DIR
|
ARG NUSQLITE3_DIR
|
||||||
ARG NUSQLITE3_PATH
|
ARG NUSQLITE3_PATH
|
||||||
ARG PUID=1000
|
ARG PUID
|
||||||
ARG PGID=1000
|
ARG PGID
|
||||||
|
|
||||||
# Install only runtime dependencies
|
# Install only runtime dependencies
|
||||||
RUN apk add --no-cache --update \
|
RUN apk add --no-cache --update \
|
||||||
@ -59,14 +63,14 @@ RUN apk add --no-cache --update \
|
|||||||
&& apk del shadow \
|
&& apk del shadow \
|
||||||
&& mkdir -p /config /metadata \
|
&& mkdir -p /config /metadata \
|
||||||
&& chown -R audiobookshelf:audiobookshelf /config /metadata \
|
&& chown -R audiobookshelf:audiobookshelf /config /metadata \
|
||||||
&& chmod u=rwx,go=rw /config /metadata
|
&& chmod a=rws /config /metadata
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy compiled frontend and server from build stages
|
# Copy compiled frontend and server from build stages
|
||||||
COPY --from=build-client /client/dist /app/client/dist
|
COPY --chmod=755 --from=build-client /client/dist /app/client/dist
|
||||||
COPY --from=build-server /server /app
|
COPY --chmod=755 --from=build-server /server /app
|
||||||
COPY --from=build-server ${NUSQLITE3_PATH} ${NUSQLITE3_PATH}
|
COPY --chmod=755 --from=build-server ${NUSQLITE3_PATH} ${NUSQLITE3_PATH}
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user