File size: 429 Bytes
87117c4 7047035 87117c4 7047035 87117c4 7047035 87117c4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# Use a base image with Java installed
FROM openjdk:8-jre-alpine
# Set the working directory inside the container
WORKDIR /app
# Copy the HTML file to the container
COPY index.html .
# Expose port 8080
EXPOSE 8080
# Set the entry point to run the Java HTTP server
CMD ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "http-server.jar"]
# Copy the Java HTTP server JAR file to the container
COPY http-server.jar .
|