33 lines
1.0 KiB
Docker
Raw Normal View History

2021-12-02 23:10:08 +01:00
FROM openjdk:18-jdk-alpine3.13
LABEL maintainer="Kim Oliver Drechsel kim@drechsel.xyz"
ARG MINECRAFT_SERVER_VERSION
ARG DOWNLOAD_URL
LABEL org.opencontainers.image.authors="Kim Oliver Drechsel kim@drechsel.xyz"
LABEL org.opencontainers.image.version="$MINECRAFT_SERVER_VERSION"
LABEL org.opencontainers.image.description="Minecraft Vanilla Server Java Edition based on the official Java JDK 18 image running on Alpine."
LABEL org.opencontainers.image.base.name="hub.docker.com/openjdk:18-jdk-alpine3.13"
LABEL org.opencontainers.image.title="Minecraft Vanilla Server Java Edition"
ENV TZ=Europe/Berlin
ENV MINECRAFT_SERVER_VERSION="$MINECRAFT_SERVER_VERSION"
WORKDIR /app
VOLUME /app/world
VOLUME /app
ADD $DOWNLOAD_URL /opt/server.jar
COPY app /app
2021-12-03 18:29:06 +01:00
RUN apk update && \
apk add --no-cache --update coreutils && \
apk add --no-cache --update tzdata bash
2021-12-02 23:10:08 +01:00
RUN chmod 755 /app/entrypoint.sh
RUN echo "eula=true" > /app/eula.txt
EXPOSE 25565/tcp
ENTRYPOINT [ "/app/entrypoint.sh" ]
CMD [ "java", "-Xmx4G", "-jar", "server.jar", "nogui" ]