From 729223a37ae407c6b83169643047f7e9c83c43fa Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Thu, 18 Feb 2021 15:31:55 +0100 Subject: [PATCH] use latest paper version --- Dockerfile | 29 ++++++++++++++--------------- README.md | 20 ++++++++++---------- rootfs/etc/services.d/minecraft/run | 2 +- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/Dockerfile b/Dockerfile index ca4125b..add1f46 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,26 @@ -FROM alpine:3.13 as builder +FROM openjdk:11 as builder -RUN apk --no-cache add \ - openjdk8 \ - git \ +RUN git config --global user.email "papermcbuilder@vanwa.ch" +RUN git config --global user.name "Vanwa papermc builder" + +RUN apt update && apt install -y \ + patch \ maven -ENV BUILDTOOLS_VERSION=abd1c566d8cd758bac3a9d67543b719d4b9ab673 -RUN git clone https://hub.spigotmc.org/stash/scm/spigot/buildtools.git +ENV VERSION=0ea3083817707d792ebac246895455a0aa0d3425 +RUN git clone https://github.com/PaperMC/Paper.git -WORKDIR /buildtools -RUN git checkout "$BUILDTOOLS_VERSION" -RUN mvn package - -ENV SPIGOT_VERSION=1.16.5 -RUN java -jar target/BuildTools.jar --rev "$SPIGOT_VERSION" -RUN mv spigot-$SPIGOT_VERSION.jar spigot.jar +WORKDIR /Paper +RUN git checkout "$VERSION" +RUN ./paper jar +RUN mv /Paper/Paper-Server/target/paper-*.jar /Paper/Paper-Server/target/paper.jar FROM thallian/confd-env:latest -COPY --from=builder /buildtools/spigot.jar /var/lib/minecraft/spigot.jar +COPY --from=builder /Paper/Paper-Server/target/paper.jar /var/lib/minecraft/paper.jar RUN apk add --no-cache \ - openjdk8 \ + openjdk11-jre-headless \ openssl RUN addgroup minecraft -g 2222 diff --git a/README.md b/README.md index 0b98ce4..ab43466 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -A [Minecraft](https://minecraft.net) server running on [Spigot](https://www.spigotmc.org/). +A [Minecraft](https://minecraft.net) server running on [Paper](https://papermc.io/). # Volumes - `/var/lib/minecraft/plugins` @@ -12,7 +12,7 @@ A [Minecraft](https://minecraft.net) server running on [Spigot](https://www.spig # Environment Variables ## SERVER_NAME -The name of the server. +The name of the server. ## MOTD Message of the day. @@ -33,7 +33,7 @@ One of: - 1: Ops can bypass spawn protection. - 2: Ops can use /clear, /difficulty, /effect, /gamemode, /gamerule, /give, and /tp, and can edit command blocks. - 3: Ops can use /ban, /deop, /kick, and /op. -- 4: Ops can use /stop. +- 4: Ops can use /stop. ## ALLOW_NETHER - default: true @@ -43,7 +43,7 @@ Whether players can travel to the Nether. ## ALLOW_FLIGHT - default: false -Allows users to use flight on your server while in Survival mode, if they have a mod that provides flight installed. +Allows users to use flight on your server while in Survival mode, if they have a mod that provides flight installed. No effect in Creative mode. ## ANNOUNCE_PLAYER_ACHIEVEMENTS @@ -64,7 +64,7 @@ One of: - FLAT: A flat world with no features, meant for building. - LARGEBIOMES: Same as default but all biomes are larger. - AMPLIFIED: Same as default but world-generation height limit is increased. -- CUSTOMIZED: Same as default unless generator-settings is set to a preset. +- CUSTOMIZED: Same as default unless generator-settings is set to a preset. ## MAX_BUILD_HEIGHT - default: 256 @@ -74,7 +74,7 @@ The maximum height in which building is allowed. Terrain may still naturally gen ## SPAWN_NPCS - default: true -Determines whether villagers will be spawned. +Determines whether villagers will be spawned. ## SPAWN_ANIMALS - default: true @@ -84,7 +84,7 @@ Determines if [animals](http://minecraft.gamepedia.com/Mob#Passive) will be able ## SPAWN_MONSTERS - default: true -Determines if monsters will be spawned. +Determines if monsters will be spawned. ## GENERATE_STRUCTURES - default: true @@ -115,7 +115,7 @@ One of: - 0: Peaceful - 1: Easy - 2: Normal -- 3: Hard +- 3: Hard ## GAMEMODE - default: 0 @@ -126,7 +126,7 @@ One of: - 0: Survival - 1: Creative - 2: Adventure -- 3: Spectator +- 3: Spectator ## ONLINE_MODE - default: true @@ -141,7 +141,7 @@ If non-zero, players are kicked from the server if they are idle for more than t ## MAX_PLAYERS - default: 20 -The maximum number of players that can play on the server at the same time. +The maximum number of players that can play on the server at the same time. ## VIEW_DISTANCE - default: 10 diff --git a/rootfs/etc/services.d/minecraft/run b/rootfs/etc/services.d/minecraft/run index cb269e2..f1e2bca 100755 --- a/rootfs/etc/services.d/minecraft/run +++ b/rootfs/etc/services.d/minecraft/run @@ -1,4 +1,4 @@ #!/usr/bin/with-contenv sh cd /var/lib/minecraft -exec s6-setuidgid minecraft java -Xms${MIN_RAM:-512M} -Xmx${MAX_RAM:-512M} -XX:+UseG1GC -jar /var/lib/minecraft/spigot.jar +exec s6-setuidgid minecraft java -Xms${MIN_RAM:-512M} -Xmx${MAX_RAM:-512M} -XX:+UseG1GC -jar /var/lib/minecraft/paper.jar