From b02d8855989c87f7cddb5bf78207bd168931a8d9 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 27 May 2025 08:09:21 +0800 Subject: [PATCH 1/6] Modified README to specify downloading the Node.js version instead of Linux version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 97fb2d3..6c1a155 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ wget https://raw.githubusercontent.com/BenjaminPrice/fvtt-docker/master/docker-c ### Step 2 - Download the Foundry VTT Zip File - Navigate to your User Profile page and find your Software Download Links on your license page. -- Download the `Linux` version. +- Download the `Node.js` version. - Save it to the same directory as the `docker-compose.yaml` file from the previous step. ### Step 3 - Create your data directory From a7569835444e1ef84e90bda04bd2cb2253b0f21e Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 27 May 2025 19:59:09 +0800 Subject: [PATCH 2/6] Added step to delete everything in resources/app to ensure that the directory is empty before moving the new files --- run-server.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/run-server.sh b/run-server.sh index 2f70e0d..f907458 100644 --- a/run-server.sh +++ b/run-server.sh @@ -1,7 +1,6 @@ #!/bin/sh -# look for a file name foundryvtt-.....zip or FoundryVTT...zip, copy it to -# /opt/foundryvtt, unzip and remove it. Then start the foundry app +set -e # Exit immediately on error cd /opt/foundryvtt || exit echo "Copying zip file..." @@ -10,9 +9,12 @@ find /host -type f -name '[f,F]oundry[vtt,VTT]*.zip' -exec cp '{}' . ';' echo "Unzipping..." unzip -o ./*.zip -d unpacked && rm ./*.zip -echo "Moving to mapped directory" +echo "Cleaning target app folder..." +rm -rf resources/app/* + +echo "Moving to mapped directory..." mv unpacked/* resources/app/ -echo "Starting node" +echo "Starting node..." cd resources/app -node main.mjs --dataPath=/data/foundryvtt \ No newline at end of file +exec node main.mjs --dataPath=/data/foundryvtt \ No newline at end of file From cf5f1837c81d1479531cb285762c869248173218 Mon Sep 17 00:00:00 2001 From: Kryptoxic Date: Sat, 23 May 2026 15:48:45 +0800 Subject: [PATCH 3/6] Updated publish pipelines to point to both docker hub and ghcr --- .github/workflows/publish-docker.yml | 24 ++++++++++++++++++------ README.md | 6 ++++-- docker-compose.yaml | 2 +- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index eeea401..7b45155 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -1,22 +1,25 @@ -name: Push to Docker Hub +name: Push to Docker Hub and GHCR on: push: - branches: + branches: - master tags: - 'v*' jobs: build: - runs-on: ubuntu-latest - + runs-on: self-hosted + permissions: + contents: read + packages: write + steps: - uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -26,10 +29,19 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push uses: docker/build-push-action@v5 with: context: . platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x push: true - tags: direckthit/fvtt-docker:latest + tags: | + cryptoxic/fvtt-docker:latest + ghcr.io/kryptoxic/fvtt-docker:latest diff --git a/README.md b/README.md index 6c1a155..16d5f9b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,9 @@ ## Foundry VTT - Docker -This repository hosts the Foundry VTT `Dockerfile` for [direckthit/fvtt-docker](https://hub.docker.com/r/direckthit/fvtt-docker) on Docker Hub. +This repository hosts the Foundry VTT `Dockerfile` for [cryptoxic/fvtt-docker](https://hub.docker.com/r/cryptoxic/fvtt-docker) on Docker Hub and [ghcr.io/kryptoxic/fvtt-docker](https://github.com/Kryptoxic/fvtt-docker/pkgs/container/fvtt-docker) on the GitHub Container Registry. + +> Originally created by [BenjaminPrice](https://github.com/BenjaminPrice/fvtt-docker), based on the original [direckthit/fvtt-docker](https://hub.docker.com/r/direckthit/fvtt-docker) image. This fork is maintained by [Kryptoxic](https://github.com/Kryptoxic) following the archival of the upstream repository. > [Foundry VTT](https://foundryvtt.com/) is a virtual tabletop for playing tabletop RPG games such as Dungeons & Dragons 5e. @@ -64,7 +66,7 @@ Using the above link should grant you a $100 credit (expires in 60 days). Manually download it or use the command below ```shell -wget https://raw.githubusercontent.com/BenjaminPrice/fvtt-docker/master/docker-compose.yaml +wget https://raw.githubusercontent.com/Kryptoxic/fvtt-docker/master/docker-compose.yaml ``` ### Step 2 - Download the Foundry VTT Zip File diff --git a/docker-compose.yaml b/docker-compose.yaml index b8a2b01..ac885ae 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,7 @@ version: '3' services: foundryvtt: - image: direckthit/fvtt-docker:latest + image: cryptoxic/fvtt-docker:latest container_name: fvtt ports: - 30000:30000 From f8ff7da7f599e96b1d80e6447ddf481dade50547 Mon Sep 17 00:00:00 2001 From: Kryptoxic Date: Sat, 23 May 2026 16:55:33 +0800 Subject: [PATCH 4/6] Updated dockerfile to use node 22 as recommended by foundry --- .github/workflows/publish-docker.yml | 18 ++++++++++++++---- Dockerfile | 2 +- docker-compose.yaml | 1 - run-server.sh | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 7b45155..9f08048 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -36,12 +36,22 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: | + cryptoxic/fvtt-docker + ghcr.io/kryptoxic/fvtt-docker + tags: | + type=semver,pattern={{version}} + type=raw,value=latest,enable={{is_default_branch}} + - name: Build and push uses: docker/build-push-action@v5 with: context: . - platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x + platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/s390x push: true - tags: | - cryptoxic/fvtt-docker:latest - ghcr.io/kryptoxic/fvtt-docker:latest + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index f2ba562..3843177 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-alpine +FROM node:22-alpine RUN deluser node && \ mkdir -p /opt/foundryvtt/resources/app && \ diff --git a/docker-compose.yaml b/docker-compose.yaml index ac885ae..eea566a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,4 +1,3 @@ -version: '3' services: foundryvtt: image: cryptoxic/fvtt-docker:latest diff --git a/run-server.sh b/run-server.sh index f907458..7e46f8a 100644 --- a/run-server.sh +++ b/run-server.sh @@ -4,7 +4,7 @@ set -e # Exit immediately on error cd /opt/foundryvtt || exit echo "Copying zip file..." -find /host -type f -name '[f,F]oundry[vtt,VTT]*.zip' -exec cp '{}' . ';' +find /host -type f -name '[Ff]oundry*.zip' -exec cp '{}' . ';' echo "Unzipping..." unzip -o ./*.zip -d unpacked && rm ./*.zip From ae94c17fa305e8b8291b7c1d5bb21a8daeab3abc Mon Sep 17 00:00:00 2001 From: Kryptoxic Date: Sat, 23 May 2026 17:47:55 +0800 Subject: [PATCH 5/6] Updated README --- .github/workflows/publish-docker.yml | 93 +++++++++++++++++++++++++--- README.md | 55 +++++++++++----- 2 files changed, 123 insertions(+), 25 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 9f08048..f21db6c 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -7,14 +7,32 @@ on: tags: - 'v*' +env: + DOCKERHUB_IMAGE: cryptoxic/fvtt-docker + GHCR_IMAGE: ghcr.io/kryptoxic/fvtt-docker + jobs: build: runs-on: self-hosted permissions: contents: read packages: write + strategy: + fail-fast: false + matrix: + platform: + - linux/amd64 + - linux/arm/v6 + - linux/arm/v7 + - linux/arm64/v8 + - linux/s390x steps: + - name: Prepare platform pair + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV + - uses: actions/checkout@v4 - name: Set up QEMU @@ -29,6 +47,60 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKERHUB_IMAGE }} + + - name: Build and push by digest + id: build + uses: docker/build-push-action@v5 + with: + context: . + platforms: ${{ matrix.platform }} + labels: ${{ steps.meta.outputs.labels }} + outputs: type=image,name=${{ env.DOCKERHUB_IMAGE }},push-by-digest=true,name-canonical=true,push=true + + - name: Export digest + run: | + mkdir -p /tmp/digests + digest="${{ steps.build.outputs.digest }}" + touch "/tmp/digests/${digest#sha256:}" + + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ env.PLATFORM_PAIR }} + path: /tmp/digests/* + if-no-files-found: error + retention-days: 1 + + merge: + runs-on: self-hosted + needs: + - build + permissions: + contents: read + packages: write + + steps: + - name: Download digests + uses: actions/download-artifact@v4 + with: + path: /tmp/digests + pattern: digests-* + merge-multiple: true + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: @@ -41,17 +113,18 @@ jobs: uses: docker/metadata-action@v5 with: images: | - cryptoxic/fvtt-docker - ghcr.io/kryptoxic/fvtt-docker + ${{ env.DOCKERHUB_IMAGE }} + ${{ env.GHCR_IMAGE }} tags: | type=semver,pattern={{version}} type=raw,value=latest,enable={{is_default_branch}} - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/s390x - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + - name: Create manifest list and push + working-directory: /tmp/digests + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf '${{ env.DOCKERHUB_IMAGE }}@sha256:%s ' *) + + - name: Inspect image + run: | + docker buildx imagetools inspect ${{ env.DOCKERHUB_IMAGE }}:${{ steps.meta.outputs.version }} diff --git a/README.md b/README.md index 16d5f9b..6c5aa0e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ # Foundry VTT - Docker - +[![amd64](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=amd64&label=amd64&sort=semver&style=flat-square)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) +[![arm/v6](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=arm&variant=v6&label=arm%2Fv6&sort=semver&style=flat-square)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) +[![arm/v7](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=arm&variant=v7&label=arm%2Fv7&sort=semver&style=flat-square)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) +[![arm64](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=arm64&variant=v8&label=arm64&sort=semver&style=flat-square)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) +[![s390x](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=s390x&label=s390x&sort=semver&style=flat-square)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) ## Foundry VTT - Docker @@ -10,7 +14,7 @@ This repository hosts the Foundry VTT `Dockerfile` for [cryptoxic/fvtt-docker](h > [Foundry VTT](https://foundryvtt.com/) is a virtual tabletop for playing tabletop RPG games such as Dungeons & Dragons 5e. -I've also included a basic `docker-compose.yaml` file which you can use to get things up and running quickly. +A basic `docker-compose.yaml` file is included to get things up and running quickly. ### **Note** At the request of the author of Foundry VTT, the source code for Foundry VTT is not included in this image. @@ -21,30 +25,21 @@ You will need to manually download the zip file from your Foundry VTT account on ## **Recommended Hosting** -I recommend you host your server on a dedicated server. They can be quite cheap. +Hosting your server on a dedicated server is recommended. These can be quite cheap. If you don't have a preferred provider, a $5 Ubuntu server from either of the below options are good considerations. ### **Hosting Options** -#### Linode +#### Linode (Akamai) A great cheap provider with servers all around the globe. They're one of the older VPS providers still around. -**This is where I personally choose to host my games** - -[Sign Up](https://www.linode.com/?r=311b3d1469c9a251020a9385437b21266fa076f0) - -A couple promo codes you can try during registration (no guarantees): - -- `OBJECT20` - $20 Credit -- `LINODE10` - $10 Credit +[Sign Up](https://www.linode.com/) #### Digital Ocean Another great cheap provider with servers all around the globe. -[Sign Up](https://m.do.co/c/879607663421) - -Using the above link should grant you a $100 credit (expires in 60 days). +[Sign Up](https://www.digitalocean.com/) --- @@ -153,3 +148,33 @@ Replace `127.0.0.1` with your own IP address. you can customize your login screen using a fix such as this one: [prettier login screen](https://github.com/TheEpicSnowWolf/Foundry-VTT-Prettier-Login-Screen) +--- + +## **Pinning to a Specific Version** + +The provided `docker-compose.yaml` uses the `:latest` tag, which always tracks the most recent build of `master`. For a more stable deployment, pin to a tagged release by updating the `image:` line in your `docker-compose.yaml`: + +```yaml +image: cryptoxic/fvtt-docker:1.0.0 +``` + +Available versions are listed on the [Docker Hub tags page](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) and the [GHCR package page](https://github.com/Kryptoxic/fvtt-docker/pkgs/container/fvtt-docker). + +## **Using GitHub Container Registry Instead** + +The same multi-architecture image is published to both Docker Hub and the GitHub Container Registry. To pull from GHCR instead, replace the `image:` line in `docker-compose.yaml` with: + +```yaml +image: ghcr.io/kryptoxic/fvtt-docker:latest +``` + +## **Supported Architectures** + +Each tagged image is built for the following platforms: + +- `linux/amd64` +- `linux/arm/v6` +- `linux/arm/v7` +- `linux/arm64/v8` +- `linux/s390x` + From 80cfe71161bfbd68da11b6f85bd1c0fd3ceca65f Mon Sep 17 00:00:00 2001 From: Kryptoxic Date: Sat, 23 May 2026 21:53:48 +0800 Subject: [PATCH 6/6] Updated publish workflow --- .github/workflows/publish-docker.yml | 40 +++++++++++++++++----------- README.md | 10 +++---- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index f21db6c..ec705dd 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -4,8 +4,6 @@ on: push: branches: - master - tags: - - 'v*' env: DOCKERHUB_IMAGE: cryptoxic/fvtt-docker @@ -33,29 +31,35 @@ jobs: platform=${{ matrix.platform }} echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Login to Docker Hub - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Compute version + id: vars + run: echo "version=$(date -u +%Y.%m.%d)-${GITHUB_SHA::7}" >> $GITHUB_OUTPUT + - name: Extract Docker metadata id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: images: ${{ env.DOCKERHUB_IMAGE }} + tags: | + type=raw,value=${{ steps.vars.outputs.version }} - name: Build and push by digest id: build - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v7 with: context: . platforms: ${{ matrix.platform }} @@ -69,7 +73,7 @@ jobs: touch "/tmp/digests/${digest#sha256:}" - name: Upload digest - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: digests-${{ env.PLATFORM_PAIR }} path: /tmp/digests/* @@ -86,38 +90,42 @@ jobs: steps: - name: Download digests - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: path: /tmp/digests pattern: digests-* merge-multiple: true - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Login to Docker Hub - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Compute version + id: vars + run: echo "version=$(date -u +%Y.%m.%d)-${GITHUB_SHA::7}" >> $GITHUB_OUTPUT + - name: Extract Docker metadata id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: images: | ${{ env.DOCKERHUB_IMAGE }} ${{ env.GHCR_IMAGE }} tags: | - type=semver,pattern={{version}} type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=${{ steps.vars.outputs.version }},enable={{is_default_branch}} - name: Create manifest list and push working-directory: /tmp/digests @@ -127,4 +135,4 @@ jobs: - name: Inspect image run: | - docker buildx imagetools inspect ${{ env.DOCKERHUB_IMAGE }}:${{ steps.meta.outputs.version }} + docker buildx imagetools inspect ${{ env.DOCKERHUB_IMAGE }}:${{ steps.vars.outputs.version }} diff --git a/README.md b/README.md index 6c5aa0e..9eaf746 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Foundry VTT - Docker -[![amd64](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=amd64&label=amd64&sort=semver&style=flat-square)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) -[![arm/v6](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=arm&variant=v6&label=arm%2Fv6&sort=semver&style=flat-square)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) -[![arm/v7](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=arm&variant=v7&label=arm%2Fv7&sort=semver&style=flat-square)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) -[![arm64](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=arm64&variant=v8&label=arm64&sort=semver&style=flat-square)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) -[![s390x](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=s390x&label=s390x&sort=semver&style=flat-square)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) +[![amd64](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=amd64&label=amd64&style=flat-square&filter=!latest)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) +[![arm/v6](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=arm&variant=v6&label=arm%2Fv6&style=flat-square&filter=!latest)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) +[![arm/v7](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=arm&variant=v7&label=arm%2Fv7&style=flat-square&filter=!latest)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) +[![arm64](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=arm64&variant=v8&label=arm64&style=flat-square&filter=!latest)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) +[![s390x](https://img.shields.io/docker/v/cryptoxic/fvtt-docker?arch=s390x&label=s390x&style=flat-square&filter=!latest)](https://hub.docker.com/r/cryptoxic/fvtt-docker/tags) ## Foundry VTT - Docker