From 05e9a0a373b6dc594b55c58838e9b74987df581f Mon Sep 17 00:00:00 2001 From: fithwum Date: Thu, 16 Jun 2022 17:58:19 -0700 Subject: [PATCH] updates --- Dockerfile => alpine/Dockerfile | 4 +--- {files => alpine/files}/Install_Script.sh | 0 debian/Dockerfile | 29 +++++++++++++++++++++++ debian/files/Install_Script.sh | 25 +++++++++++++++++++ 4 files changed, 55 insertions(+), 3 deletions(-) rename Dockerfile => alpine/Dockerfile (81%) rename {files => alpine/files}/Install_Script.sh (100%) create mode 100644 debian/Dockerfile create mode 100644 debian/files/Install_Script.sh diff --git a/Dockerfile b/alpine/Dockerfile similarity index 81% rename from Dockerfile rename to alpine/Dockerfile index 399625c..e291fb9 100644 --- a/Dockerfile +++ b/alpine/Dockerfile @@ -1,12 +1,10 @@ -#FROM fithwum/debian-base:bullseye FROM alpine:latest -ARG INSTALL_SCRIPT=https://raw.githubusercontent.com/fithwum/foundryvtt/master/files/Install_Script.sh +ARG INSTALL_SCRIPT=https://raw.githubusercontent.com/fithwum/foundryvtt/master/alpine/files/Install_Script.sh ENV PUID=99 ENV GUID=100 -#RUN addgroup foundry && adduser -q --disabled-password --ingroup foundry foundry RUN adduser -D -u 99 -G users -h /foundry -s /bin/bash foundry # Install dependencies and folder creation diff --git a/files/Install_Script.sh b/alpine/files/Install_Script.sh similarity index 100% rename from files/Install_Script.sh rename to alpine/files/Install_Script.sh diff --git a/debian/Dockerfile b/debian/Dockerfile new file mode 100644 index 0000000..663164f --- /dev/null +++ b/debian/Dockerfile @@ -0,0 +1,29 @@ +FROM fithwum/debian-base:bullseye + +ARG INSTALL_SCRIPT=https://raw.githubusercontent.com/fithwum/foundryvtt/master/debian/files/Install_Script.sh + +ENV PUID=99 +ENV GUID=100 + +RUN addgroup foundry && adduser -q --disabled-password --ingroup foundry foundry + +# Install dependencies and folder creation +RUN apk update && apk add --no-cache ca-certificates libstdc++ su-exec bash-completion tar nodejs npm \ + && mkdir -p /foundry /ftemp \ + && chmod 777 -R /foundry \ + && chown 99:100 -R /foundry + +ADD "${INSTALL_SCRIPT}" /ftemp +RUN chmod +x /ftemp/Install_Script.sh \ + && chown 99:100 -R /ftemp/Install_Script.sh + +# USER foundry + +# directory where data is stored +VOLUME /foundry + +# TCP Port +EXPOSE 30000 + +# Run command +CMD [ "/bin/sh", "/ftemp/Install_Script.sh" ] diff --git a/debian/files/Install_Script.sh b/debian/files/Install_Script.sh new file mode 100644 index 0000000..0c68e5e --- /dev/null +++ b/debian/files/Install_Script.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# Copyright (c) 2018 fithwum +# All rights reserved + +# Variables. +FVTT_VERSION=V9_Stable + +echo " " +echo "Current FoundryVTT Release version is ${FVTT_VERSION}." + +sleep 1 + +# Set permissions. +mkdir -p /foundry/fvtt /foundry/data +chown 99:100 -R /foundry +chmod 776 -R /foundry +chmod +x /foundry/ + +# Run. +echo "INFO ! Starting FoundryVTT Server" +echo " " +# exec node /foundry/fvtt/resources/app/main.js --dataPath=/foundry/data +su foundry -c 'node /foundry/fvtt/resources/app/main.js --dataPath=/foundry/data --ignore-gpu-blacklist' + +exit