Update Dockerfile
Browse files- Dockerfile +9 -13
Dockerfile
CHANGED
@@ -1,18 +1,14 @@
|
|
1 |
-
# Use
|
2 |
-
FROM
|
3 |
|
4 |
-
# Set the working directory
|
5 |
-
WORKDIR /
|
6 |
|
7 |
-
# Copy the
|
8 |
-
COPY
|
9 |
|
10 |
-
#
|
11 |
-
RUN npm install -g http-server
|
12 |
-
|
13 |
-
# Expose port 7860
|
14 |
EXPOSE 7860
|
15 |
|
16 |
-
#
|
17 |
-
CMD ["
|
18 |
-
|
|
|
1 |
+
# Use the official OpenJDK 17 image as the base image
|
2 |
+
FROM adoptopenjdk:17-jdk-hotspot
|
3 |
|
4 |
+
# Set the working directory to /minecraft
|
5 |
+
WORKDIR /minecraft
|
6 |
|
7 |
+
# Copy the server.jar file to the container
|
8 |
+
COPY server.jar /minecraft/server.jar
|
9 |
|
10 |
+
# Expose the Minecraft server port
|
|
|
|
|
|
|
11 |
EXPOSE 7860
|
12 |
|
13 |
+
# Start the Minecraft server
|
14 |
+
CMD ["java", "-jar", "server.jar"]
|
|