forked from julia/Dockerfiles
Add minecraft-spigot
This commit is contained in:
parent
77f1be415a
commit
c006f57246
2 changed files with 26 additions and 0 deletions
25
minecraft-spigot/Dockerfile
Normal file
25
minecraft-spigot/Dockerfile
Normal file
|
@ -0,0 +1,25 @@
|
|||
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
|
||||
CMD [ "java", "-jar", "../spigot.jar" ]
|
1
minecraft-spigot/build.sh
Executable file
1
minecraft-spigot/build.sh
Executable file
|
@ -0,0 +1 @@
|
|||
docker build --no-cache -t minecraft-spigot:$1 --build-arg VERSION=$1 .
|
Loading…
Reference in a new issue