2021-11-05 22:06:12 +00:00
|
|
|
FROM alpine:edge AS buildtools
|
|
|
|
|
|
|
|
ARG VERSION
|
|
|
|
|
|
|
|
RUN apk add git openjdk17 curl
|
|
|
|
RUN adduser -D buildtools
|
|
|
|
|
|
|
|
USER buildtools
|
|
|
|
WORKDIR /home/buildtools
|
|
|
|
RUN curl -o buildtools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
|
|
|
|
|
|
|
|
RUN java -jar buildtools.jar --rev $VERSION
|
|
|
|
RUN mv ./spigot-$VERSION.jar ./spigot.jar
|
|
|
|
|
|
|
|
FROM openjdk:latest AS minecraft-paper
|
|
|
|
|
|
|
|
RUN mkdir /usr/games/minecraft-spigot /usr/games/minecraft-spigot/data
|
|
|
|
RUN chown -R games /usr/games
|
|
|
|
|
|
|
|
USER games
|
|
|
|
WORKDIR /usr/games/minecraft-spigot
|
|
|
|
COPY --chown=games:users --from=buildtools /home/buildtools/spigot.jar ./spigot.jar
|
|
|
|
|
|
|
|
WORKDIR /usr/games/minecraft-spigot/data
|
2023-06-21 10:39:44 +00:00
|
|
|
CMD [ "java", "-Dcom.mojang.eula.agree=true", "-jar", "../spigot.jar" ]
|