2024-03-12 18:33:19 +00:00
|
|
|
# ============================
|
|
|
|
# Prepare Node Environment
|
|
|
|
FROM hub.aiursoft.cn/node:21-alpine as node-env
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN node ./.github/readme-generate.js
|
|
|
|
|
|
|
|
# ============================
|
|
|
|
# Prepare Build Environment
|
|
|
|
FROM hub.aiursoft.cn/python:3.11 as python-env
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=node-env /app .
|
2024-06-02 06:15:16 +00:00
|
|
|
RUN pip install -r requirements.txt && rm node_modules -rf
|
2024-06-03 07:32:04 +00:00
|
|
|
RUN apt-get update && apt-get install -y weasyprint fonts-noto-cjk wget unzip
|
|
|
|
RUN wget https://gitlab.aiursoft.cn/anduin/anduinos/-/raw/master/Config/fonts.conf -O /etc/fonts/local.conf
|
|
|
|
RUN wget -P /tmp https://gitlab.aiursoft.cn/anduin/anduinos/-/raw/master/Assets/fonts.zip
|
|
|
|
RUN unzip -o /tmp/fonts.zip -d /usr/share/fonts/
|
|
|
|
RUN rm -f /tmp/fonts.zip
|
|
|
|
RUN sudo fc-cache -fv
|
|
|
|
|
2024-06-03 07:26:59 +00:00
|
|
|
RUN mkdocs build
|
2024-03-12 18:33:19 +00:00
|
|
|
|
|
|
|
# ============================
|
|
|
|
# Prepare Runtime Environment
|
|
|
|
FROM hub.aiursoft.cn/aiursoft/static
|
2024-06-03 07:26:59 +00:00
|
|
|
COPY --from=python-env /app/site /data
|