2024-05-15 19:04:26 +00:00
|
|
|
|
FROM ghcr.io/abhinavsingh/proxy.py:base as builder
|
2021-12-25 12:11:15 +00:00
|
|
|
|
|
2024-08-10 04:58:53 +00:00
|
|
|
|
LABEL org.opencontainers.image.title="proxy.py" \
|
|
|
|
|
org.opencontainers.image.description="💫 Ngrok FRP Alternative • ⚡ Fast • 🪶 Lightweight • 0️⃣ Dependency • 🔌 Pluggable • \
|
2021-11-25 14:58:26 +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" \
|
2024-08-10 04:58:53 +00:00
|
|
|
|
org.opencontainers.image.url="https://github.com/abhinavsingh/proxy.py" \
|
2024-05-15 19:04:26 +00:00
|
|
|
|
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>" \
|
2024-08-10 04:58:53 +00:00
|
|
|
|
org.opencontainers.image.vendor="Abhinav Singh" \
|
|
|
|
|
org.opencontainers.image.created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
|
|
|
|
|
org.opencontainers.image.documentation="https://github.com/abhinavsingh/proxy.py#readme" \
|
|
|
|
|
org.opencontainers.image.ref.name="abhinavsingh/proxy.py" \
|
|
|
|
|
com.abhinavsingh.docker.cmd="docker run -it --rm -p 8899:8899 abhinavsingh/proxy.py"
|
2021-12-25 12:11:15 +00:00
|
|
|
|
|
2021-11-25 14:58:26 +00:00
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
2024-05-15 19:04:26 +00:00
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
2021-12-25 12:11:15 +00:00
|
|
|
|
|
|
|
|
|
ARG SKIP_OPENSSL
|
2021-11-25 14:58:26 +00:00
|
|
|
|
ARG PROXYPY_PKG_PATH
|
2018-12-22 15:08:04 +00:00
|
|
|
|
|
2021-11-25 14:58:26 +00:00
|
|
|
|
COPY README.md /
|
|
|
|
|
COPY $PROXYPY_PKG_PATH /
|
2021-12-25 12:11:15 +00:00
|
|
|
|
|
2024-05-15 19:04:26 +00:00
|
|
|
|
# proxy.py itself needs no external dependencies
|
|
|
|
|
# Optionally, include openssl to allow
|
|
|
|
|
# users to use TLS interception features using Docker
|
|
|
|
|
# Use `--build-arg SKIP_OPENSSL=1` to disable openssl installation
|
|
|
|
|
RUN /proxy/venv/bin/pip install --no-compile --no-cache-dir \
|
|
|
|
|
-U pip && \
|
|
|
|
|
/proxy/venv/bin/pip install --no-compile --no-cache-dir \
|
2021-11-25 14:58:26 +00:00
|
|
|
|
--no-index \
|
|
|
|
|
--find-links file:/// \
|
|
|
|
|
proxy.py && \
|
2024-05-15 19:04:26 +00:00
|
|
|
|
rm *.whl && \
|
|
|
|
|
find . -type d -name '__pycache__' | xargs rm -rf && \
|
|
|
|
|
rm -rf /var/cache/apk/* && \
|
|
|
|
|
rm -rf /root/.cache/ && \
|
|
|
|
|
/proxy/venv/bin/pip uninstall -y wheel setuptools pip && \
|
|
|
|
|
/usr/local/bin/pip uninstall -y wheel setuptools pip
|
2020-06-17 12:24:43 +00:00
|
|
|
|
|
2024-08-10 10:27:02 +00:00
|
|
|
|
FROM python:3.12-alpine
|
2024-05-15 19:04:26 +00:00
|
|
|
|
COPY --from=builder /README.md /README.md
|
|
|
|
|
COPY --from=builder /proxy /proxy
|
|
|
|
|
RUN if [[ -z "$SKIP_OPENSSL" ]]; then \
|
|
|
|
|
apk update && \
|
|
|
|
|
apk --no-cache add openssl && \
|
|
|
|
|
rm -rf /var/cache/apk/* && \
|
|
|
|
|
rm -rf /root/.cache/; \
|
|
|
|
|
fi
|
|
|
|
|
ENV PATH="/proxy/venv/bin:${PATH}"
|
2019-10-10 22:15:27 +00:00
|
|
|
|
EXPOSE 8899/tcp
|
2019-10-30 03:41:39 +00:00
|
|
|
|
ENTRYPOINT [ "proxy" ]
|
2021-12-19 16:00:43 +00:00
|
|
|
|
CMD [ \
|
|
|
|
|
"--hostname=0.0.0.0" \
|
|
|
|
|
]
|