mitmproxy/release/docker/Dockerfile
Maximilian Hils 99aa0a70af
Docker: use latest python and debian (#7242)
* docker: use latest python and debian

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-10-13 18:21:57 +02:00

27 lines
702 B
Docker

FROM python:3.13-bookworm AS wheelbuilder
COPY mitmproxy-*-py3-none-any.whl /wheels/
RUN pip install wheel && pip wheel --wheel-dir /wheels /wheels/*.whl
FROM python:3.13-slim-bookworm
RUN useradd -mU mitmproxy
RUN apt-get update \
&& apt-get install -y --no-install-recommends gosu nano \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /home/mitmproxy/.mitmproxy \
&& chown mitmproxy:mitmproxy /home/mitmproxy/.mitmproxy
COPY --from=wheelbuilder /wheels /wheels
RUN pip install --no-index --find-links=/wheels mitmproxy
RUN rm -rf /wheels
VOLUME /home/mitmproxy/.mitmproxy
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 8080 8081
CMD ["mitmproxy"]