foundryvtt-container/Containerfile

22 lines
955 B
Plaintext
Raw Normal View History

2021-09-22 21:39:24 +00:00
FROM docker.io/library/debian:stable-slim
ARG FOUNDRY_VERSION
ENV FOUNDRY_VERSION=${FOUNDRY_VERSION}
# We need nodejs 14.x, we get it from upstream
2021-09-22 21:39:24 +00:00
RUN apt-get update
# xz-utils is required for decompressing '.tar.xz'
RUN apt-get install -y libssl-dev wget unzip xz-utils
RUN wget 'https://nodejs.org/download/release/v14.19.3/node-v14.19.3-linux-x64.tar.xz' -O node.tar.xz -q
RUN mkdir -p /usr/local/
RUN tar -xf /node.tar.xz -C /usr/local/ --strip-components 1
RUN rm -f /node.tar.xz /usr/local/CHANGELOG.md /usr/local/LICENSE /usr/local/README.md
2021-09-22 21:39:24 +00:00
RUN useradd --system foundry --home-dir /var/lib/foundry
RUN mkdir -p /var/lib/foundry/vtt
RUN mkdir -p /var/lib/foundry/data
WORKDIR /var/lib/foundry/vtt
COPY FoundryVTT-${FOUNDRY_VERSION}.zip /root/foundryvtt.zip
2021-09-22 21:39:24 +00:00
RUN unzip /root/foundryvtt.zip
RUN rm /root/foundryvtt.zip
RUN chown -R foundry: /var/lib/foundry
USER foundry
CMD /usr/local/bin/node resources/app/main.js --dataPath=/var/lib/foundry/data