mitmproxy/release/docker/Dockerfile

43 lines
1.0 KiB
Docker
Raw Normal View History

2020-11-01 15:12:49 +00:00
FROM alpine:3.12
2018-05-18 08:37:56 +00:00
ENV LANG=en_US.UTF-8
ARG WHEEL_MITMPROXY
ARG WHEEL_BASENAME_MITMPROXY
COPY $WHEEL_MITMPROXY /home/mitmproxy/
# Add our user first to make sure the ID get assigned consistently,
# regardless of whatever dependencies get added.
RUN addgroup -S mitmproxy && adduser -S -G mitmproxy mitmproxy \
&& apk add --no-cache \
su-exec \
git \
g++ \
libffi \
libffi-dev \
libstdc++ \
openssl \
openssl-dev \
python3 \
python3-dev \
2018-12-02 10:35:22 +00:00
&& python3 -m ensurepip --upgrade \
&& pip3 install -U pip \
2018-05-18 08:37:56 +00:00
&& LDFLAGS=-L/lib pip3 install -U /home/mitmproxy/${WHEEL_BASENAME_MITMPROXY} \
&& apk del --purge \
git \
g++ \
libffi-dev \
openssl-dev \
python3-dev \
&& rm -rf ~/.cache/pip /home/mitmproxy/${WHEEL_BASENAME_MITMPROXY}
VOLUME /home/mitmproxy/.mitmproxy
2018-09-15 12:00:20 +00:00
COPY release/docker/docker-entrypoint.sh /usr/local/bin/
2018-05-18 08:37:56 +00:00
ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 8080 8081
CMD ["mitmproxy"]