diff --git a/minecraft/fabric/.env.example b/minecraft/fabric/.env.example index 08e197c..cc46522 100644 --- a/minecraft/fabric/.env.example +++ b/minecraft/fabric/.env.example @@ -1,3 +1,8 @@ +# This setting overwrites the base image from which the final image is build. +# Unless you have a reason to change this (e.g. using an ARM version), you can +# just leave this blank. +BASE_IMAGE= + # Build arguments MC_VERSION= FABRIC_VERSION= diff --git a/minecraft/fabric/Dockerfile b/minecraft/fabric/Dockerfile index 35926a5..8ffbe1a 100644 --- a/minecraft/fabric/Dockerfile +++ b/minecraft/fabric/Dockerfile @@ -1,4 +1,8 @@ -FROM openjdk:8-jre-slim +ARG BASE_IMAGE + +# We use ${:-} instead of a default value because the argument is always passed +# to the build, it'll just be blank most likely +FROM ${BASE_IMAGE:-'openjdk:8-jre-slim'} # Build arguments ARG MC_VERSION diff --git a/minecraft/fabric/docker-compose.yml b/minecraft/fabric/docker-compose.yml index a0baa73..28d43bf 100644 --- a/minecraft/fabric/docker-compose.yml +++ b/minecraft/fabric/docker-compose.yml @@ -4,8 +4,9 @@ services: build: context: . args: - - 'MC_VERSION' + - 'BASE_IMAGE' - 'FABRIC_VERSION' + - 'MC_VERSION' image: 'chewingbever/mc-fabric:${MC_VERSION}-${FABRIC_VERSION}' restart: 'always' diff --git a/minecraft/forge/.env.example b/minecraft/forge/.env.example index 2669eef..9e7c069 100644 --- a/minecraft/forge/.env.example +++ b/minecraft/forge/.env.example @@ -1,3 +1,8 @@ +# This setting overwrites the base image from which the final image is build. +# Unless you have a reason to change this (e.g. using an ARM version), you can +# just leave this blank. +BASE_IMAGE= + # Build arguments MC_VERSION= FORGE_VERSION= @@ -9,8 +14,8 @@ XMX=4 # Mount points # The mods should be placed inside the CONFIG_DIR under `mods` -CONFIG_DIR= -WORLDS_DIR= +CONFIG_DIR=config +WORLDS_DIR=worlds # Other PORT=25565 diff --git a/minecraft/forge/Dockerfile b/minecraft/forge/Dockerfile index 796426b..ad4d3dd 100644 --- a/minecraft/forge/Dockerfile +++ b/minecraft/forge/Dockerfile @@ -1,4 +1,8 @@ -FROM openjdk:8-jre-slim +ARG BASE_IMAGE + +# We use ${:-} instead of a default value because the argument is always passed +# to the build, it'll just be blank most likely +FROM ${BASE_IMAGE:-'openjdk:8-jre-slim'} # Build arguments ARG MC_VERSION diff --git a/minecraft/forge/docker-compose.yml b/minecraft/forge/docker-compose.yml index 5bd5cdf..f8077d2 100644 --- a/minecraft/forge/docker-compose.yml +++ b/minecraft/forge/docker-compose.yml @@ -4,8 +4,9 @@ services: build: context: . args: - - 'MC_VERSION' + - 'BASE_IMAGE' - 'FORGE_VERSION' + - 'MC_VERSION' image: 'chewingbever/mc-forge:${MC_VERSION}-${FORGE_VERSION}' restart: 'always' diff --git a/minecraft/papermc/.env.example b/minecraft/papermc/.env.example index 84ca0db..52a9625 100644 --- a/minecraft/papermc/.env.example +++ b/minecraft/papermc/.env.example @@ -1,3 +1,8 @@ +# This setting overwrites the base image from which the final image is build. +# Unless you have a reason to change this (e.g. using an ARM version), you can +# just leave this blank. +BASE_IMAGE= + # Build arguments MC_VERSION= PAPERMC_VERSION= diff --git a/minecraft/papermc/Dockerfile b/minecraft/papermc/Dockerfile index 291e717..97be29b 100644 --- a/minecraft/papermc/Dockerfile +++ b/minecraft/papermc/Dockerfile @@ -1,4 +1,8 @@ -FROM openjdk:11-jre-slim +ARG BASE_IMAGE + +# We use ${:-} instead of a default value because the argument is always passed +# to the build, it'll just be blank most likely +FROM ${BASE_IMAGE:-'openjdk:11-jre-slim'} # Build arguments ARG MC_VERSION diff --git a/minecraft/papermc/docker-compose.yml b/minecraft/papermc/docker-compose.yml index 4e77ba5..fd4afec 100644 --- a/minecraft/papermc/docker-compose.yml +++ b/minecraft/papermc/docker-compose.yml @@ -4,6 +4,7 @@ services: build: context: . args: + - 'BASE_IMAGE' - 'MC_VERSION' - 'PAPERMC_VERSION' image: 'chewingbever/mc-papermc:${MC_VERSION}-${PAPERMC_VERSION}'