Skip to content

Commit

Permalink
更换镜像源以加快国内构建
Browse files Browse the repository at this point in the history
  • Loading branch information
Elijah-0616 authored and lss233 committed May 4, 2023
1 parent 46400b6 commit 898f489
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Dockerfile-cn
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM python:3.11.2-slim-bullseye

ENV DEBIAN_FRONTEND=noninteractive

COPY ./fonts/sarasa-mono-sc-regular.ttf /usr/share/fonts/

RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN cat /etc/apt/sources.list

RUN apt-get update && \
apt install --no-install-recommends xvfb binutils qtbase5-dev wkhtmltopdf ffmpeg -yq && \
(strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 || true) && \
apt-get remove --purge -yq binutils && \
apt-get clean && \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false && \
rm -rf /var/lib/apt/lists/*

RUN mkdir -p /app
WORKDIR /app

COPY requirements.txt /app
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn --no-cache-dir -r requirements.txt && pip cache purge

COPY . /app

CMD ["/bin/bash", "/app/docker/start.sh"]

0 comments on commit 898f489

Please sign in to comment.