Files
minecraft-server/Universal/Dockerfile
2024-11-05 18:36:28 +01:00

25 lines
524 B
Docker

# Basis-Image with Java
FROM openjdk:24-jdk-slim
# Install curl
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
# Workdirectory
WORKDIR /minecraft
# Accept EULA
RUN echo "eula=true" > eula.txt
# Expose Minecraft port
EXPOSE 25565
# Define default memory if not set
ENV MEMORY=2G
# Download Minecraft-Server-JAR with entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Use entrypoint to allow variable expansion and download JAR
ENTRYPOINT ["/entrypoint.sh"]