2021-06-15 13:47:50 +00:00
|
|
|
FROM python:3.9-buster as wheelbuilder
|
2018-05-18 08:37:56 +00:00
|
|
|
|
2021-03-12 07:45:21 +00:00
|
|
|
ARG MITMPROXY_WHEEL
|
2021-06-15 13:47:50 +00:00
|
|
|
COPY $MITMPROXY_WHEEL /wheels/
|
|
|
|
RUN pip install wheel && pip wheel --wheel-dir /wheels /wheels/${MITMPROXY_WHEEL}
|
|
|
|
|
|
|
|
FROM python:3.9-slim-buster
|
2018-05-18 08:37:56 +00:00
|
|
|
|
2021-03-11 15:49:07 +00:00
|
|
|
RUN useradd -mU mitmproxy
|
|
|
|
RUN apt-get update \
|
2021-04-05 08:09:34 +00:00
|
|
|
&& apt-get install -y --no-install-recommends gosu \
|
2021-03-11 15:49:07 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2021-05-11 09:17:09 +00:00
|
|
|
|
2021-06-15 13:47:50 +00:00
|
|
|
COPY --from=wheelbuilder /wheels /wheels
|
|
|
|
RUN pip install --no-index --find-links=/wheels mitmproxy
|
|
|
|
RUN rm -rf /wheels
|
2018-05-18 08:37:56 +00:00
|
|
|
|
|
|
|
VOLUME /home/mitmproxy/.mitmproxy
|
|
|
|
|
2021-03-12 07:45:21 +00:00
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
2018-05-18 08:37:56 +00:00
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
|
|
|
|
|
|
EXPOSE 8080 8081
|
|
|
|
|
|
|
|
CMD ["mitmproxy"]
|