Update Dockerfile
This commit is contained in:
parent
bc727a91c7
commit
cd20ecc53f
1 changed files with 12 additions and 1 deletions
13
Dockerfile
13
Dockerfile
|
|
@ -1,5 +1,5 @@
|
|||
# Use the official Python image as a base
|
||||
FROM python:3.11-slim
|
||||
FROM python:3.11-slim AS builder
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
|
@ -19,3 +19,14 @@ RUN mkdocs build
|
|||
# Use Nginx as the web server
|
||||
FROM nginx:latest
|
||||
|
||||
# Copy the built MkDocs site from the builder stage
|
||||
COPY --from=builder /app/site /usr/share/nginx/html
|
||||
|
||||
# Copy custom Nginx configuration file (if needed)
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Start Nginx
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue