Minecraft_Server / Dockerfile
FLODARELTIH's picture
Update Dockerfile
9b8af50 verified
raw
history blame contribute delete
645 Bytes
FROM itzg/minecraft-server:latest
# Use Paper instead of vanilla
ENV TYPE=PAPER
ENV VERSION=1.21.9
ENV EULA=TRUE
ENV ONLINE_MODE=FALSE
ENV INIT_MEMORY=8G
ENV MAX_MEMORY=8G
ENV DIFFICULTY=peaceful
ENV GAMEMODE=creative
ENV MOTD="A server hosted on HF Spaces"
ENV MAX_PLAYERS=40
ENV SERVER_PORT=25565
EXPOSE 25565
# Warn about online mode
RUN echo "Online mode disabled: ignore the warning unless hacked."
# Copy everything from container to plugins folder
RUN mkdir -p /data/plugins && \
cp -r /opt/minecraft/* /data/plugins/
# Optional: warn about HTTP errors on HF Spaces
RUN echo "Ignore HF Spaces 500 errors, not Minecraft-related."