2020-03-20 17:45:50 +01:00
|
|
|
ARG SPIGOT_VERSION=1.15.1
|
|
|
|
|
|
|
|
# Build Loup-Garou project
|
|
|
|
FROM maven:3.3-jdk-8 as LOUP_GAROU_BUILDER
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN mvn clean install
|
|
|
|
RUN mvn package
|
|
|
|
|
|
|
|
# Build Spigot project
|
|
|
|
FROM openjdk:8 AS SPIGOT_BUILDER
|
|
|
|
ARG SPIGOT_VERSION
|
|
|
|
WORKDIR /spigot
|
|
|
|
RUN apt-get update
|
|
|
|
ADD https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar buildtools.jar
|
|
|
|
RUN git config --global --unset core.autocrlf || true
|
2020-03-21 12:01:03 +01:00
|
|
|
RUN java -Xmx1024M -jar buildtools.jar --rev ${SPIGOT_VERSION}
|
2020-03-20 17:45:50 +01:00
|
|
|
|
|
|
|
# Final server image
|
|
|
|
FROM openjdk:8
|
|
|
|
ARG SPIGOT_VERSION
|
|
|
|
WORKDIR /_minecraft
|
|
|
|
COPY --from=LOUP_GAROU_BUILDER /app/target/LoupGarou.jar ./plugins/
|
|
|
|
ADD https://github.com/dmulloy2/ProtocolLib/releases/download/4.5.0/ProtocolLib.jar ./plugins
|
|
|
|
COPY --from=SPIGOT_BUILDER /spigot/spigot-${SPIGOT_VERSION}.jar ./spigot.jar
|
|
|
|
|
|
|
|
VOLUME /minecraft
|
|
|
|
WORKDIR /minecraft
|
|
|
|
EXPOSE 25565
|
|
|
|
CMD cp -rn /_minecraft/* . && tail -f /dev/null
|