Daniton commited on
Commit
87117c4
1 Parent(s): 7047035

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -8
Dockerfile CHANGED
@@ -1,11 +1,17 @@
1
- # Use an official Nginx runtime as the base image
2
- FROM nginx:latest
3
 
4
- # Copy the HTML page to the Nginx document root directory
5
- COPY index.html /usr/share/nginx/html
6
 
7
- # Expose the default Nginx port
8
- EXPOSE 80
9
 
10
- # Start the Nginx server when the container launches
11
- CMD ["nginx", "-g", "daemon off;"]
 
 
 
 
 
 
 
1
+ # Use a base image with Java installed
2
+ FROM openjdk:8-jre-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
+ # Expose port 8080
11
+ EXPOSE 8080
12
+
13
+ # Set the entry point to run the Java HTTP server
14
+ CMD ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "http-server.jar"]
15
+
16
+ # Copy the Java HTTP server JAR file to the container
17
+ COPY http-server.jar .