23 lines
551 B
Docker
23 lines
551 B
Docker
# Use the official Python image as a base
|
|
FROM python:3.11-slim
|
|
|
|
# Set the working directory in the container
|
|
WORKDIR /app
|
|
|
|
# Copy the requirements file if you have one
|
|
COPY requirements.txt .
|
|
|
|
# Install MkDocs and any other dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy the entire MkDocs project into the container
|
|
COPY . .
|
|
|
|
# Build the MkDocs project
|
|
RUN mkdocs build
|
|
|
|
# Expose the port that MkDocs will run on
|
|
EXPOSE 3000
|
|
|
|
# Command to run the MkDocs server on port 3000
|
|
CMD ["mkdocs", "serve", "--dev-addr=0.0.0.0:3000"]
|