minecraft/Dockerfile

39 lines
940 B
Docker
Raw Normal View History

2021-02-18 12:32:55 +00:00
FROM alpine:3.13 as builder
2016-07-20 14:56:47 +00:00
2020-08-03 13:35:13 +00:00
RUN apk --no-cache add \
2021-02-18 12:32:55 +00:00
openjdk8 \
git \
maven
ENV BUILDTOOLS_VERSION=abd1c566d8cd758bac3a9d67543b719d4b9ab673
RUN git clone https://hub.spigotmc.org/stash/scm/spigot/buildtools.git
WORKDIR /buildtools
RUN git checkout "$BUILDTOOLS_VERSION"
RUN mvn package
2019-12-20 11:20:32 +00:00
2021-02-18 12:32:55 +00:00
ENV SPIGOT_VERSION=1.16.5
RUN java -jar target/BuildTools.jar --rev "$SPIGOT_VERSION"
RUN mv spigot-$SPIGOT_VERSION.jar spigot.jar
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
2021-02-18 12:32:55 +00:00
COPY --from=builder /buildtools/spigot.jar /var/lib/minecraft/spigot.jar
2017-10-18 08:26:41 +00:00
2020-08-03 13:35:13 +00:00
RUN apk add --no-cache \
2020-08-03 14:27:48 +00:00
openjdk8 \
2020-08-03 13:35:13 +00:00
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