Update Dockerfile
This commit is contained in:
parent
a127152333
commit
d07912ddab
1 changed files with 9 additions and 1 deletions
10
Dockerfile
10
Dockerfile
|
|
@ -3,27 +3,35 @@ FROM python:3.11-slim AS builder
|
||||||
|
|
||||||
# Set the working directory in the container
|
# Set the working directory in the container
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
RUN pwd # Print the current working directory
|
||||||
|
|
||||||
# Copy the requirements file
|
# Copy the requirements file
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
RUN pwd # Print the current working directory
|
||||||
|
|
||||||
# Install MkDocs and any other dependencies
|
# Install MkDocs and any other dependencies
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
RUN pwd # Print the current working directory
|
||||||
|
|
||||||
# Copy the entire MkDocs project into the container
|
# Copy the entire MkDocs project into the container
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN pwd # Print the current working directory
|
||||||
|
|
||||||
# Build the MkDocs project
|
# Build the MkDocs project
|
||||||
RUN mkdocs build
|
RUN mkdocs build
|
||||||
|
RUN pwd # Print the current working directory
|
||||||
|
|
||||||
# Use Nginx as the web server
|
# Use Nginx as the web server
|
||||||
FROM nginx:latest
|
FROM nginx:latest
|
||||||
|
RUN pwd # Print the current working directory
|
||||||
|
|
||||||
# Copy the built MkDocs site from the builder stage
|
# Copy the built MkDocs site from the builder stage
|
||||||
COPY --from=builder /app/site /usr/share/nginx/html
|
COPY --from=builder /app/site /usr/share/nginx/html
|
||||||
|
RUN pwd # Print the current working directory
|
||||||
|
|
||||||
# Copy custom Nginx configuration file (if needed)
|
# Copy custom Nginx configuration file (if needed)
|
||||||
# COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
RUN pwd # Print the current working directory
|
||||||
|
|
||||||
# Expose port 80
|
# Expose port 80
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue