Skip to content

Commit

Permalink
减小基础镜像体积
Browse files Browse the repository at this point in the history
  • Loading branch information
aipeach authored Feb 4, 2024
1 parent 78ab265 commit 9e111f7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion docker/Metafile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
ADD https://raw.githubusercontent.com/AirportR/FullTclash/dev/requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt && \
pip3 install --no-cache-dir supervisor
pip3 install --no-cache-dir supervisor

FROM python:3.11.7-slim-bookworm

COPY --from=compile-image /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=compile-image /opt/venv /opt/venv

ENV PATH="/opt/venv/bin:$PATH"
9 changes: 8 additions & 1 deletion docker/Metafile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,11 @@ RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
ADD https://raw.githubusercontent.com/AirportR/FullTclash/dev/requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt && \
pip3 install --no-cache-dir supervisor
pip3 install --no-cache-dir supervisor

FROM python:3.11.7-alpine3.19

COPY --from=compile-image /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=compile-image /opt/venv /opt/venv

ENV PATH="/opt/venv/bin:$PATH"

0 comments on commit 9e111f7

Please sign in to comment.