Skip to content

Latest commit

 

History

History
93 lines (74 loc) · 2.97 KB

File metadata and controls

93 lines (74 loc) · 2.97 KB

Building the image

Most users never need to build the image — pull a published tag as described in the project README. This guide is for contributors and for the rare case where a locally built or pre-loaded image is useful.

Building from source

Build the image using this git repository as the build context:

docker build \
  --build-arg CONTAINER_VERSION=14.368.0 \
  --build-arg FOUNDRY_VERSION=14.368 \
  --tag ghcr.io/felddy/foundryvtt:14.368.0 \
  https://github.com/felddy/foundryvtt-docker.git#develop

Cross-platform builds

To build images for other CPU architectures, use Docker's buildx feature:

  1. Clone the project:

    git clone https://github.com/felddy/foundryvtt-docker.git
    cd foundryvtt-docker
  2. Build with buildx, selecting the target platform:

    docker buildx build \
      --platform linux/amd64 \
      --build-arg CONTAINER_VERSION=14.368.0 \
      --build-arg FOUNDRY_VERSION=14.368 \
      --output type=docker \
      --tag ghcr.io/felddy/foundryvtt:14.368.0 .

Pre-installed distribution builds

A Foundry Virtual Tabletop distribution can be installed into the image at build time. The resulting image is significantly larger, but it starts faster because nothing is downloaded at startup, and authentication happens at build time rather than at run time.

Build with credentials

Note

Credentials are only used to fetch a distribution; they are not stored in the resulting image.

docker build \
  --build-arg CONTAINER_VERSION=14.368.0 \
  --build-arg FOUNDRY_VERSION=14.368 \
  --secret id=foundry_username,src=<(echo "<your_username>") \
  --secret id=foundry_password,src=<(echo "<your_password>") \
  --tag ghcr.io/felddy/foundryvtt:14.368.0 \
  https://github.com/felddy/foundryvtt-docker.git#develop

Tip

If your credentials are stored in a json file, as described in the secrets reference, extract and pass them as build secrets:

docker build \
  --build-arg CONTAINER_VERSION=14.368.0 \
  --build-arg FOUNDRY_VERSION=14.368 \
  --secret id=foundry_username,src=<(jq -r '.foundry_username' path/to/credentials.json) \
  --secret id=foundry_password,src=<(jq -r '.foundry_password' path/to/credentials.json) \
  --tag ghcr.io/felddy/foundryvtt:14.368.0 \
  https://github.com/felddy/foundryvtt-docker.git#develop

More information about Docker build secrets is in the Docker documentation.

Build with a temporary URL

docker build \
  --build-arg CONTAINER_VERSION=14.368.0 \
  --build-arg FOUNDRY_VERSION=14.368 \
  --build-arg FOUNDRY_RELEASE_URL='<temporary_url>' \
  --tag ghcr.io/felddy/foundryvtt:14.368.0 \
  https://github.com/felddy/foundryvtt-docker.git#develop