Download Dockerfile from riddhiman/mc_test: direct link, hf CLI and curl.
- Browser
- Download file 620 Bytes
-
https://huggingface.co/spaces/riddhiman/mc_test/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/riddhiman/mc_test/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/riddhiman/mc_test/resolve/main/Dockerfile
620 Bytes
| FROM openjdk:21 | |
| WORKDIR /minecraft | |
| # Copy the Minecraft server JAR | |
| COPY server.jar /minecraft | |
| # Exposing the Minecraft server port | |
| EXPOSE 7860 | |
| # Setting the JVM options | |
| ENV JAVA_OPTS="-Xmx1024M -Xms1024M" | |
| # Automatically agree to the EULA. Note: Make sure you have | |
| # actually read and agree to the EULA at https://account.mojang.com/documents/minecraft_eula | |
| RUN echo "eula=true" > /minecraft/eula.txt | |
| # Create a user as running as root is not advisable | |
| RUN useradd -m -d /minecraft -s /bin/false minecraft && chown -R minecraft:minecraft /minecraft | |
| USER minecraft | |
| CMD java ${JAVA_OPTS} -jar server.jar --port 7860 |