# Use the official OpenJDK 17 image as the base image | |
FROM adoptopenjdk:17-jdk-hotspot | |
# Set the working directory to /minecraft | |
WORKDIR /minecraft | |
# Copy the server.jar file to the container | |
COPY server.jar /minecraft/server.jar | |
# Expose the Minecraft server port | |
EXPOSE 7860 | |
# Start the Minecraft server | |
CMD ["java", "-jar", "server.jar"] | |