From 27d756acaf1154f7a094e384696da5fcca823c4d Mon Sep 17 00:00:00 2001 From: Crovaxon Date: Mon, 10 Jun 2024 23:32:47 +0200 Subject: [PATCH] Initial 1.0 version, created alpine and node 20 based docker image for FoundryVTT and set up entrypoint script. --- Dockerfile | 27 +++++++++++++++++++++++++++ entrypoint.sh | 4 ++++ 2 files changed, 31 insertions(+) create mode 100644 Dockerfile create mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e6ed501 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM node:20-alpine +LABEL maintainer="crovaxon" + +WORKDIR /app + +ENV PUID=99 +ENV PGID=100 +ENV UMASK=022 +ENV PATH="/app:${PATH}" + +#RUN addgroup -g ${GUID} foundry +#RUN adduser -H -u ${PUID} -s /bin/bash foundry foundry +#USER foundry + +RUN apk update & apk add --no-cache ca-certificates libstdc++ su-exec bash-completion tar nodejs npm + +COPY entrypoint.sh ./ + +# directory of the Foundry application +VOLUME /foundry +#directory of the Foundry user data +VOLUME /foundrydata + +# default TCP port +EXPOSE 30000 + +ENTRYPOINT ["/app/entrypoint.sh"] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..30604b9 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +chown -R ${PUID}:${PGID} /foundry +exec su-exec ${PUID}:${PGID} node /foundry/resources/app/main.js --dataPath=/foundrydata \ No newline at end of file