Daniton commited on
Commit
8ff89fa
1 Parent(s): 4e292ef

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -13
Dockerfile CHANGED
@@ -1,18 +1,14 @@
1
- # Use a base image with Node.js installed
2
- FROM node:14-alpine
3
 
4
- # Set the working directory inside the container
5
- WORKDIR /app
6
 
7
- # Copy the HTML file to the container
8
- COPY index.html .
9
 
10
- # Install http-server globally
11
- RUN npm install -g http-server
12
-
13
- # Expose port 7860
14
  EXPOSE 7860
15
 
16
- # Set the entry point to run http-server
17
- CMD ["http-server", "-p", "7860"]
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"]