Skip to content

Commit

Permalink
测试
Browse files Browse the repository at this point in the history
  • Loading branch information
Haibersut committed Jul 31, 2023
1 parent a94ba4e commit b6c41be
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,38 +1,23 @@
FROM python:3.11.2-slim-bullseye as builder
FROM python:3.11.2-slim-bullseye

ENV DEBIAN_FRONTEND=noninteractive

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

RUN apt-get update && \
apt install --no-install-recommends xvfb binutils build-essential qtbase5-dev wkhtmltopdf ffmpeg -yq && \
(strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 || true)
(strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 || true) && \
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 --no-cache-dir -r requirements.txt && pip cache purge

FROM python:3.11.2-slim-bullseye

ENV DEBIAN_FRONTEND=noninteractive

COPY --from=builder /usr/share/fonts/ /usr/share/fonts/
COPY --from=builder /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
COPY --from=builder /usr/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
COPY --from=builder /usr/bin/ffmpeg /usr/bin/ffmpeg
COPY --from=builder /usr/local/lib/python3.11/site-packages/ /usr/local/lib/python3.11/site-packages/

RUN apt-get update && \
apt install --no-install-recommends xvfb -yq && \
apt-get remove --purge -yq binutils build-essential qtbase5-dev && \
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
RUN apt-get apt-get remove --purge -yq binutils build-essential qtbase5-dev

COPY . /app

Expand Down

0 comments on commit b6c41be

Please sign in to comment.