Added build script for graal and temurin builds

This commit is contained in:
2022-11-15 02:27:22 +01:00
commit ad88921f1c
4 changed files with 218 additions and 0 deletions

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
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", "-jar", "/server.jar", "--nogui", "-Xms${INIT_MEMORY}", "-Xmx${MAX_MEMORY}"]