mc-test / Dockerfile
Clone04's picture
Update Dockerfile
38bd99e verified
raw
history blame contribute delete
437 Bytes
# Use the official OpenJDK 17 image as the base image
FROM itzg/minecraft-server
# Set the working directory to /minecraft
WORKDIR /minecraft
RUN -d -it -p 25565:25565 -e EULA=TRUE itzg/minecraft-server
# Copy the server.jar file to the container
COPY server.jar /minecraft/server.jar
RUN chmod 777 /minecraft/server.jar
# Expose the Minecraft server port
EXPOSE 7860
# Start the Minecraft server
CMD ["java", "-jar", "server.jar"]