minecraft/Dockerfile

29 lines
830 B
Docker
Raw Normal View History

2020-07-26 08:48:53 +00:00
FROM alpine:3.12 as builder
2016-07-20 14:56:47 +00:00
2020-06-28 16:10:45 +00:00
ENV VERSION=1.16.1
2019-12-20 11:20:32 +00:00
2019-12-20 08:36:14 +00:00
RUN apk --no-cache add openssl git openjdk8
2017-10-18 08:26:41 +00:00
RUN wget "https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar" && \
2019-12-20 11:20:32 +00:00
java -jar BuildTools.jar --rev $VERSION
2017-10-18 08:26:41 +00:00
2018-11-27 07:36:16 +00:00
FROM thallian/confd-env:latest
2017-10-18 08:26:41 +00:00
COPY --from=builder /spigot*.jar /var/lib/minecraft/spigot.jar
2019-12-20 11:20:32 +00:00
COPY --from=builder /CraftBukkit/target/craftbukkit*.jar /var/lib/minecraft/craftbukkit.jar
2017-10-18 08:26:41 +00:00
2019-12-20 08:36:14 +00:00
RUN apk add --no-cache openjdk8 openssl
2016-07-20 14:56:47 +00:00
2017-10-18 09:27:59 +00:00
RUN addgroup minecraft -g 2222
RUN adduser -u 2222 -h /var/lib/minecraft -D -G minecraft minecraft
2016-07-20 14:56:47 +00:00
2017-07-12 08:26:40 +00:00
RUN mkdir -p /etc/services.d/minecraft/
2016-07-20 14:56:47 +00:00
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
2017-10-18 08:26:41 +00:00
EXPOSE 25565