mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-18 15:36:22 +00:00
Compare commits
63 Commits
java7
...
2021.18.0-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b0b8f8a62 | ||
|
|
e94b40bddf | ||
|
|
2dabf34349 | ||
|
|
eb864c0fb8 | ||
|
|
2e0f469748 | ||
|
|
aa95dc291b | ||
|
|
d22280fae7 | ||
|
|
aac3c1c77a | ||
|
|
61b0eff4ca | ||
|
|
8c5f0a53bf | ||
|
|
fffeb7bb9c | ||
|
|
a060cc88d1 | ||
|
|
4421aaa22d | ||
|
|
3a51db6d24 | ||
|
|
969a23ae27 | ||
|
|
1a62592fe2 | ||
|
|
c316dbb5d2 | ||
|
|
bb64135c9b | ||
|
|
ef98de154c | ||
|
|
3d00077ef8 | ||
|
|
0d3ab75683 | ||
|
|
87681e64bb | ||
|
|
8ce986d3d7 | ||
|
|
67fda61de4 | ||
|
|
7c6ec41822 | ||
|
|
93af2025a2 | ||
|
|
c1b040af77 | ||
|
|
4148325787 | ||
|
|
7083cd15e8 | ||
|
|
7418dab476 | ||
|
|
94bbc8e649 | ||
|
|
3e5e62229a | ||
|
|
fe2a9d56ed | ||
|
|
27571999b2 | ||
|
|
bbd7d9e39a | ||
|
|
ef6f308229 | ||
|
|
49d89d3e73 | ||
|
|
74203b23f4 | ||
|
|
4fb791b490 | ||
|
|
ced25ad50a | ||
|
|
48efc224ba | ||
|
|
467c1d9954 | ||
|
|
9ced230f55 | ||
|
|
f3a8276362 | ||
|
|
b91d63716e | ||
|
|
46cccfd531 | ||
|
|
9fe1cb4a0d | ||
|
|
076038b470 | ||
|
|
aa416729ea | ||
|
|
812c6365ec | ||
|
|
42a5131b19 | ||
|
|
624f6a210f | ||
|
|
1c63cd18b7 | ||
|
|
6266a7e3cc | ||
|
|
871ecd4d9d | ||
|
|
c572c95161 | ||
|
|
f7b58fbbb1 | ||
|
|
eccfa444a9 | ||
|
|
e831d25706 | ||
|
|
12e931332b | ||
|
|
ceee9eddc9 | ||
|
|
60ba668743 | ||
|
|
fd1b15e01f |
3
.github/workflows/build-multiarch.yml
vendored
3
.github/workflows/build-multiarch.yml
vendored
@@ -5,7 +5,6 @@ on:
|
|||||||
- master
|
- master
|
||||||
- "*-multiarch"
|
- "*-multiarch"
|
||||||
- "multiarch*"
|
- "multiarch*"
|
||||||
- java7
|
|
||||||
- java8-openj9
|
- java8-openj9
|
||||||
- java11*
|
- java11*
|
||||||
- java16*
|
- java16*
|
||||||
@@ -67,7 +66,7 @@ jobs:
|
|||||||
uses: docker/build-push-action@v2.6.1
|
uses: docker/build-push-action@v2.6.1
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm/v7
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
# ensure latest base image is used
|
# ensure latest base image is used
|
||||||
|
|||||||
39
Dockerfile
39
Dockerfile
@@ -1,4 +1,4 @@
|
|||||||
FROM openjdk:7-jre
|
FROM adoptopenjdk:8-jre-hotspot
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
||||||
|
|
||||||
@@ -6,6 +6,7 @@ RUN apt-get update \
|
|||||||
&& DEBIAN_FRONTEND=noninteractive \
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
|
gosu \
|
||||||
sudo \
|
sudo \
|
||||||
net-tools \
|
net-tools \
|
||||||
curl wget \
|
curl wget \
|
||||||
@@ -21,42 +22,6 @@ RUN apt-get update \
|
|||||||
ttf-dejavu \
|
ttf-dejavu \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
|
||||||
# Procedure from https://github.com/tianon/gosu/blob/master/INSTALL.md#from-debian
|
|
||||||
ENV GOSU_VERSION 1.14
|
|
||||||
RUN set -eux; \
|
|
||||||
# save list of currently installed packages for later so we can clean up
|
|
||||||
savedAptMark="$(apt-mark showmanual)"; \
|
|
||||||
apt-get update; \
|
|
||||||
apt-get install -y --no-install-recommends ca-certificates wget; \
|
|
||||||
if ! command -v gpg; then \
|
|
||||||
apt-get install -y --no-install-recommends gnupg2 dirmngr; \
|
|
||||||
elif gpg --version | grep -q '^gpg (GnuPG) 1\.'; then \
|
|
||||||
# "This package provides support for HKPS keyservers." (GnuPG 1.x only)
|
|
||||||
apt-get install -y --no-install-recommends gnupg-curl; \
|
|
||||||
fi; \
|
|
||||||
rm -rf /var/lib/apt/lists/*; \
|
|
||||||
\
|
|
||||||
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
|
|
||||||
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
|
|
||||||
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
|
|
||||||
\
|
|
||||||
# verify the signature
|
|
||||||
export GNUPGHOME="$(mktemp -d)"; \
|
|
||||||
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
|
|
||||||
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
|
|
||||||
command -v gpgconf && gpgconf --kill all || :; \
|
|
||||||
rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
|
|
||||||
\
|
|
||||||
# clean up fetch dependencies
|
|
||||||
apt-mark auto '.*' > /dev/null; \
|
|
||||||
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
|
|
||||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
|
||||||
\
|
|
||||||
chmod +x /usr/local/bin/gosu; \
|
|
||||||
# verify that the binary works
|
|
||||||
gosu --version; \
|
|
||||||
gosu nobody true
|
|
||||||
|
|
||||||
RUN addgroup --gid 1000 minecraft \
|
RUN addgroup --gid 1000 minecraft \
|
||||||
&& adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
|
&& adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
|
||||||
|
|
||||||
|
|||||||
17
README.md
17
README.md
@@ -52,7 +52,6 @@ By default, the container will download the latest version of the "vanilla" [Min
|
|||||||
* [Running an Canyon server](#running-an-canyon-server)
|
* [Running an Canyon server](#running-an-canyon-server)
|
||||||
* [Running a SpongeVanilla server](#running-a-spongevanilla-server)
|
* [Running a SpongeVanilla server](#running-a-spongevanilla-server)
|
||||||
* [Running a Fabric Server](#running-a-fabric-server)
|
* [Running a Fabric Server](#running-a-fabric-server)
|
||||||
* [Running a Limbo server](#running-a-limbo-server)
|
|
||||||
* [Running a server with a Feed the Beast modpack](#running-a-server-with-a-feed-the-beast-modpack)
|
* [Running a server with a Feed the Beast modpack](#running-a-server-with-a-feed-the-beast-modpack)
|
||||||
* [Environment Variables:](#environment-variables)
|
* [Environment Variables:](#environment-variables)
|
||||||
* [Upgrading](#upgrading)
|
* [Upgrading](#upgrading)
|
||||||
@@ -128,7 +127,7 @@ By default, the container will download the latest version of the "vanilla" [Min
|
|||||||
* [Enabling Autopause](#enabling-autopause)
|
* [Enabling Autopause](#enabling-autopause)
|
||||||
* [Running on RaspberryPi](#running-on-raspberrypi)
|
* [Running on RaspberryPi](#running-on-raspberrypi)
|
||||||
|
|
||||||
<!-- Added by: runner, at: Sun Aug 15 17:44:45 UTC 2021 -->
|
<!-- Added by: runner, at: Sun Aug 1 17:09:36 UTC 2021 -->
|
||||||
|
|
||||||
<!--te-->
|
<!--te-->
|
||||||
|
|
||||||
@@ -554,20 +553,6 @@ docker run -d -v /path/on/host:/data ... \
|
|||||||
|
|
||||||
In order to add mods, you have two options:
|
In order to add mods, you have two options:
|
||||||
|
|
||||||
### Running a Limbo server
|
|
||||||
|
|
||||||
A [Limbo](https://github.com/LOOHP/Limbo) server can be run by setting `TYPE` to `LIMBO`.
|
|
||||||
|
|
||||||
Configuration options with defaults:
|
|
||||||
|
|
||||||
- `LIMBO_BUILD`=LATEST
|
|
||||||
|
|
||||||
The `VERSION` will be ignored so locate the appropriate value from [here](https://ci.loohpjames.com/job/Limbo/) to match the version expected by clients.
|
|
||||||
|
|
||||||
- `FORCE_REDOWNLOAD`=false
|
|
||||||
- `LIMBO_SCHEMA_FILENAME`=default.schem
|
|
||||||
- `LEVEL`="Default;${LIMBO_SCHEMA_FILENAME}"
|
|
||||||
|
|
||||||
## Running a server with a Feed the Beast modpack
|
## Running a server with a Feed the Beast modpack
|
||||||
|
|
||||||
> **NOTE** requires one of the Debian based images listed in [the Java versions section](#running-minecraft-server-on-different-java-version).
|
> **NOTE** requires one of the Debian based images listed in [the Java versions section](#running-minecraft-server-on-different-java-version).
|
||||||
|
|||||||
@@ -98,14 +98,6 @@ case "${TYPE^^}" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
FORGE)
|
FORGE)
|
||||||
if versionLessThan 1.17; then
|
|
||||||
log "**********************************************************************"
|
|
||||||
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
|
|
||||||
log " since some mods require Java 8"
|
|
||||||
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
|
|
||||||
log " can be fixed with java8"
|
|
||||||
log "**********************************************************************"
|
|
||||||
fi
|
|
||||||
exec ${SCRIPTS:-/}start-deployForge "$@"
|
exec ${SCRIPTS:-/}start-deployForge "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -118,12 +110,6 @@ case "${TYPE^^}" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
FTB|CURSEFORGE)
|
FTB|CURSEFORGE)
|
||||||
log "**********************************************************************"
|
|
||||||
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
|
|
||||||
log " since some mods require Java 8"
|
|
||||||
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
|
|
||||||
log " can be fixed with java8"
|
|
||||||
log "**********************************************************************"
|
|
||||||
exec ${SCRIPTS:-/}start-deployCF "$@"
|
exec ${SCRIPTS:-/}start-deployCF "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -171,15 +157,11 @@ case "${TYPE^^}" in
|
|||||||
exec ${SCRIPTS:-/}start-deployCanyon "$@"
|
exec ${SCRIPTS:-/}start-deployCanyon "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
LIMBO)
|
|
||||||
exec ${SCRIPTS:-/}start-deployLimbo "$@"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
*)
|
||||||
log "Invalid type: '$TYPE'"
|
log "Invalid type: '$TYPE'"
|
||||||
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
|
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
|
||||||
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, TUINITY, PURPUR"
|
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, TUINITY, PURPUR"
|
||||||
log " CUSTOM, MAGMA, MOHIST, CATSERVER, YATOPIA, AIRPLANE, CANYON, LIMBO"
|
log " CUSTOM, MAGMA, MOHIST, CATSERVER, YATOPIA, AIRPLANE, CANYON"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
@@ -30,13 +30,7 @@ if ! [ -f "${ftbInstallMarker}" ] || [ $(cat "${ftbInstallMarker}") != "${FTB_MO
|
|||||||
ftbInstaller=/data/ftb-installer
|
ftbInstaller=/data/ftb-installer
|
||||||
if ! [[ -f "${ftbInstaller}" ]]; then
|
if ! [[ -f "${ftbInstaller}" ]]; then
|
||||||
log "Downloading FTB installer"
|
log "Downloading FTB installer"
|
||||||
if [ "$(uname -m)" == "aarch64" ]; then
|
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server/linux -o "${ftbInstaller}"
|
||||||
log "Downloading ARM installer"
|
|
||||||
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server/arm/linux -o "${ftbInstaller}"
|
|
||||||
else
|
|
||||||
log "Downloading x86 installer"
|
|
||||||
curl -fsSL https://api.modpacks.ch/public/modpack/1/1/server/linux -o "${ftbInstaller}"
|
|
||||||
fi
|
|
||||||
chmod +x "${ftbInstaller}"
|
chmod +x "${ftbInstaller}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -1,57 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
|
|
||||||
. ${SCRIPTS:-/}start-utils
|
|
||||||
isDebugging && set -x
|
|
||||||
|
|
||||||
: ${LIMBO_BUILD:=LATEST}
|
|
||||||
: ${FORCE_REDOWNLOAD:=false}
|
|
||||||
: ${LIMBO_SCHEMA_FILENAME:=default.schem}
|
|
||||||
: ${LEVEL:=Default;${LIMBO_SCHEMA_FILENAME}}
|
|
||||||
|
|
||||||
if [[ ${LIMBO_BUILD^^} == LATEST ]]; then
|
|
||||||
LIMBO_BUILD=lastStableBuild
|
|
||||||
fi
|
|
||||||
|
|
||||||
baseUrl="https://ci.loohpjames.com/job/Limbo/${LIMBO_BUILD}"
|
|
||||||
buildInfoUrl="${baseUrl}/api/json"
|
|
||||||
buildJson=$(curl -fsSL "${buildInfoUrl}")
|
|
||||||
if [ $? != 0 ]; then
|
|
||||||
log "ERROR failed to get build info from ${buildInfoUrl} (status=$?)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
PURPUR_BUILD=$(jq -r '.number' <<<${buildJson})
|
|
||||||
artifactPath=$(jq -r '.artifacts[] | select(.fileName|test("^Limbo-")) | .relativePath' <<<${buildJson})
|
|
||||||
defaultSchemaPath=$(jq -r '.artifacts[] | select(.fileName|test(".*\\.schem")) | .relativePath' <<<${buildJson})
|
|
||||||
|
|
||||||
export SERVER="purpur-${PURPUR_BUILD}.jar"
|
|
||||||
|
|
||||||
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
|
||||||
downloadUrl="${baseUrl}/artifact/${artifactPath}"
|
|
||||||
log "Downloading Limbo from $downloadUrl ..."
|
|
||||||
if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then
|
|
||||||
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
|
||||||
exit 3
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "${LIMBO_SCHEMA_FILENAME}" ]; then
|
|
||||||
log "Downloading default schem file"
|
|
||||||
if ! curl -o "${LIMBO_SCHEMA_FILENAME}" -fsSL "${baseUrl}/artifact/${defaultSchemaPath}"; then
|
|
||||||
log "ERROR: failed to download schema file $baseUrl (status=$?)"
|
|
||||||
exit 3
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${LEVEL} != "*;*" ]]; then
|
|
||||||
LEVEL="${LEVEL};${LIMBO_SCHEMA_FILENAME}"
|
|
||||||
fi
|
|
||||||
export LEVEL
|
|
||||||
|
|
||||||
export SKIP_LOG4J_CONFIG=true
|
|
||||||
|
|
||||||
# Continue to Final Setup
|
|
||||||
exec ${SCRIPTS:-/}start-finalSetupWorld $@
|
|
||||||
Reference in New Issue
Block a user