29 lines
830 B
Docker
29 lines
830 B
Docker
FROM alpine:3.12 as builder
|
|
|
|
ENV VERSION=1.16.1
|
|
|
|
RUN apk --no-cache add openssl git openjdk8
|
|
|
|
RUN wget "https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar" && \
|
|
java -jar BuildTools.jar --rev $VERSION
|
|
|
|
FROM thallian/confd-env:latest
|
|
|
|
COPY --from=builder /spigot*.jar /var/lib/minecraft/spigot.jar
|
|
COPY --from=builder /CraftBukkit/target/craftbukkit*.jar /var/lib/minecraft/craftbukkit.jar
|
|
|
|
RUN apk add --no-cache openjdk8 openssl
|
|
|
|
RUN addgroup minecraft -g 2222
|
|
RUN adduser -u 2222 -h /var/lib/minecraft -D -G minecraft minecraft
|
|
|
|
RUN mkdir -p /etc/services.d/minecraft/
|
|
|
|
ADD /rootfs /
|
|
|
|
RUN chown -R minecraft:minecraft /var/lib/minecraft
|
|
|
|
VOLUME /var/lib/minecraft/world /var/lib/minecraft/world_nether /var/lib/minecraft/world_the_end /var/lib/minecraft/plugins
|
|
|
|
EXPOSE 25565
|