mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 15:13:55 +00:00
Compare commits
30 Commits
2021.2.0-a
...
2021.5.1-j
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e78e5af96d | ||
|
|
a2ab0d75ed | ||
|
|
0fb9700fc7 | ||
|
|
c48f6c31ce | ||
|
|
b2d23edf6d | ||
|
|
18925ef32c | ||
|
|
31f25cfd1b | ||
|
|
7d4e4c167e | ||
|
|
f06b990f8a | ||
|
|
eb12030975 | ||
|
|
e46af9d54c | ||
|
|
861faaa285 | ||
|
|
8312233a93 | ||
|
|
75844ae81a | ||
|
|
959bf73485 | ||
|
|
6bb2323c46 | ||
|
|
beeaf1a996 | ||
|
|
96aa1054dc | ||
|
|
e7937206af | ||
|
|
081b2c11e4 | ||
|
|
f342f4aa98 | ||
|
|
4e73e69342 | ||
|
|
c6ff80b71c | ||
|
|
37cad3f255 | ||
|
|
7814ca21b5 | ||
|
|
5700f36a6f | ||
|
|
b8806629ec | ||
|
|
4a7f838a0f | ||
|
|
34f800d815 | ||
|
|
2d07dee4df |
82
.github/workflows/build-multiarch.yml
vendored
Normal file
82
.github/workflows/build-multiarch.yml
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
name: Build and publish multiarch
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- multiarch
|
||||
- java8-multiarch
|
||||
- multiarch-latest
|
||||
- java15
|
||||
- test/multiarch/*
|
||||
tags:
|
||||
- "[0-9]+.[0-9]+.[0-9]+-multiarch"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-multiarch-latest"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-java15"
|
||||
|
||||
jobs:
|
||||
docker-buildx:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.2.0
|
||||
|
||||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
DOCKER_IMAGE=itzg/minecraft-server
|
||||
VERSION=edge
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
fi
|
||||
if [[ $GITHUB_REF == refs/heads/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/heads/}
|
||||
if [[ $VERSION == master ]]; then
|
||||
VERSION=latest
|
||||
fi
|
||||
fi
|
||||
TAGS="${DOCKER_IMAGE}:${VERSION//\//-}"
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
echo ::set-output name=cache_from::${TAGS}
|
||||
echo ::set-output name=version::${VERSION//\//-}
|
||||
echo ::set-output name=cache_version::${VERSION//\//-}
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-${{ steps.prep.outputs.cache_version }}-
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
||||
# ensure latest base image is used
|
||||
pull: true
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
labels: |
|
||||
org.opencontainers.image.documentation=https://github.com/itzg/docker-minecraft-server
|
||||
org.opencontainers.image.source=https://github.com/itzg/docker-minecraft-server
|
||||
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
9
.github/workflows/main.yml
vendored
9
.github/workflows/main.yml
vendored
@@ -4,23 +4,18 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- java8
|
||||
- openj9
|
||||
- openj9-11
|
||||
- openj9-nightly
|
||||
- adopt11
|
||||
- adopt13
|
||||
- adopt14
|
||||
- adopt15
|
||||
- test/*
|
||||
tags:
|
||||
- "[0-9]+.[0-9]+.[0-9]+"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-java8"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-openj9"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-openj9-11"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-openj9-nightly"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-adopt11"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-adopt13"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-adopt14"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-adopt15"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
||||
10
Dockerfile
10
Dockerfile
@@ -1,4 +1,4 @@
|
||||
FROM adoptopenjdk/openjdk13:alpine-jre
|
||||
FROM openjdk:8u212-jre-alpine
|
||||
|
||||
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
||||
|
||||
@@ -70,10 +70,10 @@ COPY log4j2.xml /tmp/log4j2.xml
|
||||
WORKDIR /data
|
||||
|
||||
ENV UID=1000 GID=1000 \
|
||||
MEMORY="1G" \
|
||||
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= FABRICVERSION=LATEST LEVEL=world \
|
||||
PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
||||
LEVEL_TYPE=DEFAULT SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
|
||||
JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \
|
||||
TYPE=VANILLA VERSION=LATEST \
|
||||
ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
||||
SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
|
||||
ENABLE_AUTOPAUSE=false AUTOPAUSE_TIMEOUT_EST=3600 AUTOPAUSE_TIMEOUT_KN=120 AUTOPAUSE_TIMEOUT_INIT=600 \
|
||||
AUTOPAUSE_PERIOD=10 AUTOPAUSE_KNOCK_INTERFACE=eth0
|
||||
|
||||
|
||||
82
README.md
82
README.md
@@ -160,24 +160,31 @@ the server jar remain in the `/data` directory. It is safe to remove those._
|
||||
|
||||
To use a different version of Java, please use a docker tag to run your Minecraft server.
|
||||
|
||||
| Tag name | Description | Linux |
|
||||
| -------------- | ------------------------------------------- | ------------ |
|
||||
| latest | **Default**. Uses Java version 8 | Alpine Linux |
|
||||
| adopt15 | Uses Java version 15 from AdoptOpenJDK | Alpine Linux |
|
||||
| adopt14 | Uses Java version 14 from AdoptOpenJDK | Alpine Linux |
|
||||
| adopt13 | Uses Java version 13 from AdoptOpenJDK | Alpine Linux |
|
||||
| adopt11 | Uses Java version 11 from AdoptOpenJDK | Alpine Linux |
|
||||
| openj9 | Uses Eclipse OpenJ9 JVM | Alpine Linux |
|
||||
| openj9-11 | Uses Eclipse OpenJ9 JVM for Java 11 | Alpine Linux |
|
||||
| openj9-nightly | Uses Eclipse OpenJ9 JVM testing builds | Alpine Linux |
|
||||
| multiarch | Uses Java version 8 latest update | Debian Linux |
|
||||
| multiarch-latest | Uses Java version 15 latest update | Debian Linux |
|
||||
| Tag name | Java version | Linux | JVM Type | Architecture |
|
||||
| -------------- | -------------|--------|----------|-------------------|
|
||||
| latest | 11 | Alpine | Hotspot | amd64 |
|
||||
| java8 | 8 | Alpine | Hotspot | amd64 |
|
||||
| java8-multiarch | 8 | Debian | Hotspot | amd64,arm64,armv7 |
|
||||
| java15 | 15 | Debian | Hotspot | amd64,arm64,armv7 |
|
||||
| adopt11 | 11 | Alpine | Hotspot | amd64 |
|
||||
| openj9 | 8 | Alpine | OpenJ9 | amd64 |
|
||||
| openj9-11 | 11 | Alpine | OpenJ9 | amd64 |
|
||||
| multiarch | 11 | Debian | Hotspot | amd64,arm64,armv7 |
|
||||
| multiarch-latest | 15+ | Debian | Hotspot | amd64,arm64,armv7 |
|
||||
|
||||
For example, to use a Java version 13:
|
||||
For example, to use Java version 15 on any supported architecture:
|
||||
|
||||
docker run --name mc itzg/minecraft-server:adopt13
|
||||
docker run --name mc itzg/minecraft-server:java15
|
||||
|
||||
Keep in mind that some versions of Minecraft server can't work on the newest versions of Java. Also, FORGE doesn't support openj9 JVM implementation.
|
||||
> Keep in mind that some versions of Minecraft server can't work on the newest versions of Java. Also, FORGE doesn't support openj9 JVM implementation.
|
||||
|
||||
### Deprecated Image Tags
|
||||
|
||||
The following image tags have been deprecated and are no longer receiving updates:
|
||||
- adopt13
|
||||
- adopt14
|
||||
- adopt15
|
||||
- openj9-nightly
|
||||
|
||||
## Healthcheck
|
||||
|
||||
@@ -480,6 +487,30 @@ A [Tuinity](https://github.com/Spottedleaf/Tuinity) server, which is a fork of P
|
||||
|
||||
> **NOTE** only `VERSION=LATEST` is supported
|
||||
|
||||
## Running a Purpur server
|
||||
|
||||
A [Purpur](https://purpur.pl3x.net/) server, which is "a fork of Paper and Tuinity with the goal of providing new and interesting configuration options".
|
||||
|
||||
-e TYPE=PURPUR
|
||||
|
||||
> NOTE: the `VERSION` variable is used to lookup a build of Purpur to download
|
||||
|
||||
Extra variables:
|
||||
- `PURPUR_BUILD=LATEST` : set a specific Purpur build to use
|
||||
- `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded
|
||||
|
||||
## Running a Yatopia server
|
||||
|
||||
A [Yatopia](https://github.com/YatopiaMC/Yatopia) server, which is a "blazing fast Tuinity fork with best in class performance".
|
||||
|
||||
-e TYPE=YATOPIA
|
||||
|
||||
> NOTE: the `VERSION` variable is used to locate the Yatopia version to download
|
||||
|
||||
Extra variables:
|
||||
- `RELEASE=stable` : set to `stable` or `latest`
|
||||
- `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded
|
||||
|
||||
## Running a Magma server
|
||||
|
||||
A [Magma](https://magmafoundation.org/) server, which is a combination of Forge and PaperMC, can be used with
|
||||
@@ -508,7 +539,7 @@ A [Catserver](http://catserver.moe/) type server can be used with
|
||||
|
||||
## Running a server with a Feed the Beast modpack
|
||||
|
||||
> **NOTE** requires `itzg/minecraft-server:multiarch` image
|
||||
> **NOTE** requires one of the Debian based images listed in [the Java versions section](#running-minecraft-server-on-different-java-version).
|
||||
|
||||
[Feed the Beast application](https://www.feed-the-beast.com/) modpacks are supported by using `-e TYPE=FTBA` (**note** the "A" at the end of the type). This server type will automatically take care of downloading and installing the modpack and appropriate version of Forge, so the `VERSION` does not need to be specified.
|
||||
|
||||
@@ -958,7 +989,7 @@ environment variable set to `false`, such as
|
||||
### Level Type and Generator Settings
|
||||
|
||||
By default, a standard world is generated with hills, valleys, water, etc. A different level type can
|
||||
be configured by setting `LEVEL_TYPE` to an expected type, such as
|
||||
be configured by setting `LEVEL_TYPE` to an expected type, for example
|
||||
|
||||
- DEFAULT
|
||||
- FLAT
|
||||
@@ -966,6 +997,8 @@ be configured by setting `LEVEL_TYPE` to an expected type, such as
|
||||
- AMPLIFIED
|
||||
- CUSTOMIZED
|
||||
- BUFFET
|
||||
- BIOMESOP (Biomes O' Plenty for 1.12 and older)
|
||||
- BIOMESOPLENTY (Biomes O' Plenty for 1.15 and above)
|
||||
|
||||
Descriptions are available at the [gamepedia](http://minecraft.gamepedia.com/Server.properties).
|
||||
|
||||
@@ -1096,19 +1129,18 @@ is passed to `docker run`.
|
||||
|
||||
### Memory Limit
|
||||
|
||||
By default, the image declares a Java initial and maximum memory limit of 1 GB. There are several
|
||||
ways to adjust the memory settings:
|
||||
By default, the image declares an initial and maximum Java memory-heap limit of 1 GB. There are several ways to adjust the memory settings:
|
||||
|
||||
- `MEMORY`, "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`)
|
||||
memory settings of the JVM
|
||||
- `INIT_MEMORY`, independently sets the initial heap size
|
||||
- `MAX_MEMORY`, independently sets the max heap size
|
||||
- `MEMORY`: "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`) memory heap settings of the JVM
|
||||
- `INIT_MEMORY`: independently sets the initial heap size
|
||||
- `MAX_MEMORY`: independently sets the max heap size
|
||||
|
||||
The values of all three are passed directly to the JVM and support format/units as
|
||||
`<size>[g|G|m|M|k|K]`. For example:
|
||||
The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`. For example:
|
||||
|
||||
-e MEMORY=2G
|
||||
|
||||
> NOTE: the settings above only set the Java **heap** limits. Memory resource requests and limits on the overall container should also account for non-heap memory usage. An extra 25% is [a general best practice](https://dzone.com/articles/best-practices-java-memory-arguments-for-container).
|
||||
|
||||
### JVM Options
|
||||
|
||||
General JVM options can be passed to the Minecraft Server invocation by passing a `JVM_OPTS`
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#set -x
|
||||
# Use this variable to indicate a list of branches that docker hub is watching
|
||||
branches_list=('openj9' 'openj9-11' 'openj9-nightly' 'adopt11' 'adopt13' 'adopt14' 'adopt15' 'multiarch' 'multiarch-latest')
|
||||
branches_list=('java8' 'java8-multiarch' 'openj9' 'openj9-11' 'adopt11' 'java15' 'multiarch' 'multiarch-latest')
|
||||
|
||||
function TrapExit {
|
||||
echo "Checking out back in master"
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
|
||||
: ${EULA:=}
|
||||
: ${PROXY:=}
|
||||
: ${RCON_PASSWORD_FILE:=}
|
||||
|
||||
shopt -s nullglob
|
||||
|
||||
#umask 002
|
||||
@@ -134,11 +140,19 @@ case "${TYPE^^}" in
|
||||
exec ${SCRIPTS:-/}start-deployCatserver "$@"
|
||||
;;
|
||||
|
||||
PURPUR)
|
||||
exec ${SCRIPTS:-/}start-deployPurpur "$@"
|
||||
;;
|
||||
|
||||
YATOPIA)
|
||||
exec ${SCRIPTS:-/}start-deployYatopia "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
log "Invalid type: '$TYPE'"
|
||||
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
|
||||
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA,"
|
||||
log " CUSTOM, MAGMA, MOHIST, CATSERVER"
|
||||
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, TUINITY, PURPUR"
|
||||
log " CUSTOM, MAGMA, MOHIST, CATSERVER, YATOPIA"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
|
||||
export TYPE=FORGE
|
||||
: ${FORGEVERSION:=RECOMMENDED}
|
||||
|
||||
if [[ -z $FORGE_INSTALLER && -z $FORGE_INSTALLER_URL ]]; then
|
||||
norm=$VANILLA_VERSION
|
||||
|
||||
@@ -58,7 +58,7 @@ else
|
||||
|
||||
log "Removing old PaperMC versions ..."
|
||||
paperJarSearchString=${SERVER/$build/[0-9]*}
|
||||
find . -name "$paperJarSearchString" ! -name "$SERVER" -delete -print
|
||||
find . -maxdepth 1 -name "$paperJarSearchString" ! -name "$SERVER" -delete -print
|
||||
|
||||
log "Downloading PaperMC $VANILLA_VERSION (build $build) ..."
|
||||
curl -fsSL -o "$SERVER" "${zarg[@]}" \
|
||||
|
||||
38
start-deployPurpur
Executable file
38
start-deployPurpur
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
isDebugging && set -x
|
||||
|
||||
: ${VANILLA_VERSION:?}
|
||||
: ${PURPUR_BUILD:=LATEST}
|
||||
: ${FORCE_REDOWNLOAD:=false}
|
||||
|
||||
if [[ ${PURPUR_BUILD} == LATEST ]]; then
|
||||
PURPUR_BUILD=$(curl -fsSL "https://purpur.pl3x.net/api/v1/purpur/${VANILLA_VERSION}" |
|
||||
jq -r '.builds.latest' || echo "")
|
||||
if [[ -z ${PURPUR_BUILD} ]]; then
|
||||
log "ERROR: Failed to locate a Purpur build for ${VANILLA_VERSION}."
|
||||
log " Please check if a download is available at https://purpur.pl3x.net/downloads/"
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
export SERVER="purpur-${VANILLA_VERSION}-${PURPUR_BUILD}.jar"
|
||||
|
||||
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
||||
downloadUrl="https://purpur.pl3x.net/api/v1/purpur/${VANILLA_VERSION}/${PURPUR_BUILD}/download"
|
||||
log "Downloading Purpur from $downloadUrl ..."
|
||||
if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then
|
||||
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
# Normalize on Spigot for later operations
|
||||
export TYPE=SPIGOT
|
||||
export SKIP_LOG4J_CONFIG=true
|
||||
|
||||
# Continue to Final Setup
|
||||
exec ${SCRIPTS:-/}start-finalSetupWorld $@
|
||||
@@ -3,6 +3,8 @@
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
|
||||
export TYPE=spongevanilla
|
||||
: ${SPONGEBRANCH:=STABLE}
|
||||
: ${SPONGEVERSION:=}
|
||||
|
||||
# Parse branch
|
||||
log "Choosing branch for Sponge"
|
||||
|
||||
@@ -20,7 +20,7 @@ if [ ! -f "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Normalize on Spigot for operations below
|
||||
# Normalize on Spigot for later operations
|
||||
export TYPE=SPIGOT
|
||||
|
||||
# Continue to Final Setup
|
||||
|
||||
30
start-deployYatopia
Normal file
30
start-deployYatopia
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
isDebugging && set -x
|
||||
|
||||
: ${VANILLA_VERSION:?}
|
||||
: ${RELEASE:=stable}
|
||||
: ${FORCE_REDOWNLOAD:=false}
|
||||
|
||||
requireEnum RELEASE stable latest
|
||||
|
||||
export SERVER="yatopia-${RELEASE}-${VANILLA_VERSION}.jar"
|
||||
|
||||
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
||||
downloadUrl="https://api.yatopiamc.org/v2/${RELEASE}Build/download?branch=ver/${VANILLA_VERSION}"
|
||||
log "Downloading Yatopia from $downloadUrl ..."
|
||||
if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then
|
||||
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
# Normalize on Spigot for later operations
|
||||
export TYPE=SPIGOT
|
||||
export SKIP_LOG4J_CONFIG=true
|
||||
|
||||
# Continue to Final Setup
|
||||
exec ${SCRIPTS:-/}start-finalSetupWorld $@
|
||||
@@ -69,7 +69,7 @@ function customizeServerProps {
|
||||
setServerProp "max-world-size" "$MAX_WORLD_SIZE"
|
||||
setServerProp "level-name" "$LEVEL"
|
||||
setServerProp "level-seed" "$SEED"
|
||||
setServerProp "pvp" "$PVP"
|
||||
setServerProp "pvp" "${PVP}"
|
||||
setServerProp "generator-settings" "$GENERATOR_SETTINGS"
|
||||
setServerProp "online-mode" "$ONLINE_MODE"
|
||||
setServerProp "allow-flight" "$ALLOW_FLIGHT"
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
set -e
|
||||
isDebugging && set -x
|
||||
|
||||
: ${LEVEL:=world}
|
||||
export LEVEL
|
||||
|
||||
if [ $TYPE = "FEED-THE-BEAST" ]; then
|
||||
worldDest=$FTB_DIR/$LEVEL
|
||||
else
|
||||
|
||||
@@ -168,6 +168,11 @@ function copyFilesForCurseForge() {
|
||||
cp -f /data/eula.txt "${FTB_DIR}/"
|
||||
}
|
||||
|
||||
if ! which java > /dev/null; then
|
||||
log "Fixing PATH to include java"
|
||||
PATH="${PATH}:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin"
|
||||
fi
|
||||
|
||||
mcServerRunnerArgs="--stop-duration ${STOP_DURATION:-60}s"
|
||||
if [[ ${TYPE} == "CURSE_INSTANCE" ]]; then
|
||||
if isTrue ${DEBUG_EXEC}; then
|
||||
|
||||
14
start-utils
14
start-utils
@@ -144,6 +144,20 @@ requireVar() {
|
||||
fi
|
||||
}
|
||||
|
||||
requireEnum() {
|
||||
var=${1?}
|
||||
shift
|
||||
|
||||
for allowed in $*; do
|
||||
if [[ ${!var} = $allowed ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
||||
log "ERROR: $var must be set to one of $@"
|
||||
# exit 1
|
||||
}
|
||||
|
||||
function writeEula() {
|
||||
if ! echo "# Generated via Docker
|
||||
# $(date)
|
||||
|
||||
Reference in New Issue
Block a user