Update Dockerfile
Browse files- Dockerfile +14 -8
Dockerfile
CHANGED
@@ -1,11 +1,17 @@
|
|
1 |
-
# Use
|
2 |
-
FROM
|
3 |
|
4 |
-
#
|
5 |
-
|
6 |
|
7 |
-
#
|
8 |
-
|
9 |
|
10 |
-
#
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 .
|