19 lines
481 B
Docker
19 lines
481 B
Docker
ARG DOCKER_IMAGE
|
|
FROM ${DOCKER_IMAGE}
|
|
|
|
ARG VERSION_ID
|
|
ARG VERSION_SHA1
|
|
ENV MINECRAFT_VERSION=${VERSION_ID}
|
|
ENV INIT_MEMORY="512M"
|
|
ENV MAX_MEMORY="2G"
|
|
WORKDIR /server
|
|
|
|
# Copy server file and verify checksum
|
|
VOLUME [ "/server" ]
|
|
COPY versions/${VERSION_ID}/server.jar /server.jar
|
|
COPY eula.txt /server/
|
|
RUN echo -n "${VERSION_SHA1} /server.jar" | sha1sum -c -
|
|
|
|
# Run server
|
|
EXPOSE 25565
|
|
ENTRYPOINT ["java", "-Xms${INIT_MEMORY}", "-Xmx${MAX_MEMORY}", "-jar", "/server.jar", "--nogui"] |