Files
HowToCook/Dockerfile
Anduin Xue a21c68aea3 Upgrade Docker base image from python:3.11 to python:3.13
python:3.11 causes a segfault when building with properdocs + mkdocs-static-i18n
processing both zh and en locales (379 translated files). python:3.13 matches
the local development environment and resolves the crash.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-04 15:16:27 +00:00

24 lines
623 B
Docker

# ============================
# Prepare lint Environment
FROM node:22-alpine AS lint-env
WORKDIR /app
COPY . .
RUN npm install --loglevel verbose
RUN npm run build
RUN npm run lint
# ============================
# Prepare Build Environment
FROM python:3.13 AS python-env
WORKDIR /app
COPY --from=lint-env /app .
RUN rm node_modules -rf && pip install -r requirements.txt
RUN python3 -m properdocs build
# ============================
# Prepare Runtime Environment
FROM nginx:1-alpine
COPY --from=python-env /app/site /usr/share/nginx/html
LABEL org.opencontainers.image.source="https://github.com/Anduin2017/HowToCook"