Use build argument to select foundry version

This commit is contained in:
Kienan Stewart 2022-10-02 15:09:27 -04:00
parent 3b61298fc2
commit 10ab9f2f3a
2 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,6 @@
FROM docker.io/library/debian:stable-slim 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 # We need nodejs 14.x, we get it from upstream
RUN apt-get update RUN apt-get update
# xz-utils is required for decompressing '.tar.xz' # xz-utils is required for decompressing '.tar.xz'
@ -11,7 +13,7 @@ RUN useradd --system foundry --home-dir /var/lib/foundry
RUN mkdir -p /var/lib/foundry/vtt RUN mkdir -p /var/lib/foundry/vtt
RUN mkdir -p /var/lib/foundry/data RUN mkdir -p /var/lib/foundry/data
WORKDIR /var/lib/foundry/vtt WORKDIR /var/lib/foundry/vtt
COPY foundryvtt.zip /root/foundryvtt.zip COPY FoundryVTT-${FOUNDRY_VERSION}.zip /root/foundryvtt.zip
RUN unzip /root/foundryvtt.zip RUN unzip /root/foundryvtt.zip
RUN rm /root/foundryvtt.zip RUN rm /root/foundryvtt.zip
RUN chown -R foundry: /var/lib/foundry RUN chown -R foundry: /var/lib/foundry

View File

@ -1,6 +1,11 @@
# Building # Building
`podman build -t foundry .` 1. Download foundry version to the local directory, eg. `FoundryVTT-10.285.zip`
2. Build the container
```
podman build --build-arg FOUNDRY_VERSION=10.285 -t foundry:10.285 .
```
# First run: # First run: