`--no-cache-dir` to avoid bloating the docker image

This commit is contained in:
Abhinav Singh 2024-05-15 17:16:38 +05:30
parent 58f8847001
commit 0380e8301d
1 changed files with 9 additions and 6 deletions

View File

@ -1,14 +1,17 @@
FROM python:3.11-alpine
LABEL com.abhinavsingh.name="abhinavsingh/proxy.py" \
com.abhinavsingh.description="⚡ Fast • 🪶 Lightweight • 0⃣ Dependency • 🔌 Pluggable • \
org.opencontainers.image.title="proxy.py" \
org.opencontainers.image.description="⚡ Fast • 🪶 Lightweight • 0⃣ Dependency • 🔌 Pluggable • \
😈 TLS interception • 🔒 DNS-over-HTTPS • 🔥 Poor Man's VPN • ⏪ Reverse & ⏩ Forward • \
👮🏿 \"Proxy Server\" framework • 🌐 \"Web Server\" framework • ➵ ➶ ➷ ➠ \"PubSub\" framework • \
👷 \"Work\" acceptor & executor framework" \
com.abhinavsingh.url="https://github.com/abhinavsingh/proxy.py" \
com.abhinavsingh.vcs-url="https://github.com/abhinavsingh/proxy.py" \
org.opencontainers.url="https://github.com/abhinavsingh/proxy.py" \
org.opencontainers.image.source="https://github.com/abhinavsingh/proxy.py" \
com.abhinavsingh.docker.cmd="docker run -it --rm -p 8899:8899 abhinavsingh/proxy.py" \
org.opencontainers.image.source="https://github.com/abhinavsingh/proxy.py"
org.opencontainers.image.licenses="BSD-3-Clause" \
org.opencontainers.image.authors="Abhinav Singh <mailsforabhinav@gmail.com>" \
org.opencontainers.image.vendor="Abhinav Singh"
ENV PYTHONUNBUFFERED 1
@ -25,9 +28,9 @@ RUN apk update && apk --no-cache add \
rust \
make
RUN python -m venv /proxy/venv && \
/proxy/venv/bin/pip install \
/proxy/venv/bin/pip install --no-cache-dir \
-U pip wheel && \
/proxy/venv/bin/pip install \
/proxy/venv/bin/pip install --no-cache-dir \
paramiko==3.4.0 \
cryptography==39.0.1 \
--prefer-binary