mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 07:08:10 +00:00
26 lines
618 B
Docker
26 lines
618 B
Docker
FROM python:3.10-bullseye as wheelbuilder
|
|
|
|
ARG MITMPROXY_WHEEL
|
|
COPY $MITMPROXY_WHEEL /wheels/
|
|
RUN pip install wheel && pip wheel --wheel-dir /wheels /wheels/${MITMPROXY_WHEEL}
|
|
|
|
FROM python:3.10-slim-bullseye
|
|
|
|
RUN useradd -mU mitmproxy
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends gosu \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
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"]
|