Update Dockerfile
Browse files- Dockerfile +7 -6
Dockerfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
# Use a base image with
|
2 |
-
FROM
|
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
|
14 |
-
CMD ["
|
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 |
|
|
|
|