original dockerfile
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -1,14 +1,10 @@
|
||||
FROM python:3.9-slim-buster
|
||||
# Use a lightweight Nginx image as the base
|
||||
FROM nginx:alpine
|
||||
|
||||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y nginx
|
||||
|
||||
COPY index.html /usr/share/nginx/html/index.html
|
||||
|
||||
RUN sed -i 's|root /var/www/html;|root /usr/share/nginx/html;|' /etc/nginx/sites-available/default && \
|
||||
nginx -t && \
|
||||
nginx -g 'daemon off;' & \
|
||||
nginx -s reload
|
||||
# Copy the index.html file into the Nginx default web directory
|
||||
COPY index.html /usr/share/nginx/html/
|
||||
|
||||
# Expose port 80 (which will be mapped to 5555 on the host)
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
# Nginx already runs by default, so no CMD is needed.
|
||||
|
Reference in New Issue
Block a user