HowToCook/Dockerfile

25 lines
671 B
Docker
Raw Permalink Normal View History

2024-03-13 02:33:19 +08:00
# ============================
# Prepare lint Environment
2025-04-16 13:44:04 +08:00
FROM node:22-alpine as lint-env
2024-03-13 02:33:19 +08:00
WORKDIR /app
COPY . .
RUN npm install --loglevel verbose
RUN npm run build
RUN npm run lint
2024-03-13 02:33:19 +08:00
# ============================
# Prepare Build Environment
2025-03-26 10:44:56 +08:00
FROM python:3.11 as python-env
2024-03-13 02:33:19 +08:00
WORKDIR /app
COPY --from=lint-env /app .
RUN apt-get update && apt-get install -y weasyprint fonts-noto-cjk wget unzip
RUN rm node_modules -rf && pip install -r requirements.txt
RUN mkdocs build
2024-03-13 02:33:19 +08:00
# ============================
# Prepare Runtime Environment
2025-03-26 10:44:56 +08:00
FROM aiursoft/static
COPY --from=python-env /app/site /data
LABEL org.opencontainers.image.source="https://github.com/Anduin2017/HowToCook"