Update Dockerfile
Browse files12345671 unmodified line9101112131415161718# Use the official itzg/minecraft-server imageFROM itzg/minecraft-server:latest# Set environment variablesENV EULA=TRUEENV VERSION=latestENV MEMORY=512M1 unmodified lineENV DIFFICULTY=easyENV MAX_PLAYERS=2# Expose the default Minecraft portEXPOSE 25565# Set the working directory (optional)WORKDIR /data# The itzg image already has the entrypoint, no CMD needed1234567891011121 unmodified line141516171819202122232425262728# Base image: Minecraft serverFROM itzg/minecraft-server:latest# Install Python and FlaskRUN apt-get update && \apt-get install -y python3 python3-pip && \pip3 install flask# Environment variablesENV EULA=TRUEENV VERSION=latestENV MEMORY=512M1 unmodified lineENV DIFFICULTY=easyENV MAX_PLAYERS=2# Expose Minecraft server port and Flask web portEXPOSE 25565EXPOSE 7860# Set working directoryWORKDIR /data# Copy Flask web app scriptCOPY app.py /app/app.py# Start both Minecraft server and Flask web UICMD bash -c "minecraft-server-run.sh & python3 /app/app.py"
Dockerfile+15-5