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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -6
Dockerfile CHANGED
@@ -1,5 +1,5 @@
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
@@ -7,11 +7,12 @@ WORKDIR /app
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 .
 
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
 
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 8080
14
  EXPOSE 8080
15
 
16
+ # Set the entry point to run http-server
17
+ CMD ["http-server", "-p", "8080"]
18