proxy.py/DockerfileBase

42 lines
1.6 KiB
Plaintext
Raw Normal View History

2024-05-15 11:06:49 +00:00
FROM python:3.11-alpine
LABEL com.abhinavsingh.name="abhinavsingh/proxy.py" \
org.opencontainers.image.title="proxy.py" \
org.opencontainers.image.description="⚡ Fast • 🪶 Lightweight • 0⃣ Dependency • 🔌 Pluggable • \
2024-05-15 11:06:49 +00:00
😈 TLS interception • 🔒 DNS-over-HTTPS • 🔥 Poor Man's VPN • ⏪ Reverse & ⏩ Forward • \
👮🏿 \"Proxy Server\" framework • 🌐 \"Web Server\" framework • ➵ ➶ ➷ ➠ \"PubSub\" framework • \
👷 \"Work\" acceptor & executor framework" \
org.opencontainers.url="https://github.com/abhinavsingh/proxy.py" \
org.opencontainers.image.source="https://github.com/abhinavsingh/proxy.py" \
2024-05-15 11:06:49 +00:00
com.abhinavsingh.docker.cmd="docker run -it --rm -p 8899:8899 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"
2024-05-15 11:06:49 +00:00
ENV PYTHONUNBUFFERED 1
2024-05-15 14:54:41 +00:00
ENV PYTHONDONTWRITEBYTECODE 1
2024-05-15 11:06:49 +00:00
# Install paramiko and cryptography to allow
# users to use tunneling features using Docker
RUN apk update && apk --no-cache add \
--virtual .builddeps \
gcc \
musl-dev \
libffi-dev \
openssl-dev \
python3-dev \
cargo \
rust \
make
RUN python -m venv /proxy/venv && \
2024-05-15 14:54:41 +00:00
/proxy/venv/bin/pip install --no-compile --no-cache-dir \
2024-05-15 11:06:49 +00:00
-U pip wheel && \
2024-05-15 14:54:41 +00:00
/proxy/venv/bin/pip install --no-compile --no-cache-dir \
2024-05-15 11:06:49 +00:00
paramiko==3.4.0 \
cryptography==42.0.4 \
2024-05-15 14:54:41 +00:00
--prefer-binary && \
apk del .builddeps && \
find . -type d -name '__pycache__' | xargs rm -rf && \
rm -rf /var/cache/apk/* && \
rm -rf /root/.cache/