chore: Update Dockerfile to use GitHub Container Registry for image build and push

This commit is contained in:
Anduin
2024-06-03 12:37:05 +00:00
parent a69bd83e14
commit 1f8187b070
7 changed files with 36 additions and 428 deletions

View File

@@ -1,17 +1,19 @@
# ============================
# Prepare Node Environment
FROM hub.aiursoft.cn/node:21-alpine as node-env
# Prepare lint Environment
FROM hub.aiursoft.cn/node:21-alpine as lint-env
WORKDIR /app
COPY . .
RUN node ./.github/readme-generate.js
RUN npm install
RUN npm run build
RUN npm run lint
# ============================
# Prepare Build Environment
FROM hub.aiursoft.cn/python:3.11 as python-env
WORKDIR /app
COPY --from=node-env /app .
RUN pip install -r requirements.txt && rm node_modules -rf
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 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/