Added configureable base image to minecraft containers
This commit is contained in:
parent
cc754571de
commit
6902926bc9
9 changed files with 37 additions and 7 deletions
|
|
@ -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=
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ services:
|
|||
build:
|
||||
context: .
|
||||
args:
|
||||
- 'BASE_IMAGE'
|
||||
- 'MC_VERSION'
|
||||
- 'PAPERMC_VERSION'
|
||||
image: 'chewingbever/mc-papermc:${MC_VERSION}-${PAPERMC_VERSION}'
|
||||
|
|
|
|||
Reference in a new issue