2017-02-11 23:34:22 +01:00
|
|
|
FROM alpine:latest
|
2016-09-20 00:25:05 +02:00
|
|
|
MAINTAINER Jessie Frazelle <jess@linux.com>
|
2017-02-10 22:34:51 +01:00
|
|
|
ENV LANG=en_US.UTF-8
|
2014-10-09 19:30:38 +02:00
|
|
|
|
2017-02-10 22:34:51 +01:00
|
|
|
COPY requirements.txt /tmp/requirements.txt
|
2016-01-20 09:55:59 +01:00
|
|
|
|
2017-02-10 22:34:51 +01:00
|
|
|
# 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 \
|
|
|
|
libjpeg-turbo \
|
|
|
|
libjpeg-turbo-dev \
|
|
|
|
libstdc++ \
|
|
|
|
libxml2 \
|
|
|
|
libxml2-dev \
|
|
|
|
libxslt \
|
|
|
|
libxslt-dev \
|
|
|
|
openssl \
|
|
|
|
openssl-dev \
|
|
|
|
python3 \
|
|
|
|
python3-dev \
|
|
|
|
zlib \
|
|
|
|
zlib-dev \
|
|
|
|
&& python3 -m ensurepip \
|
|
|
|
&& LDFLAGS=-L/lib pip3 install -r /tmp/requirements.txt \
|
|
|
|
&& apk del --purge \
|
|
|
|
git \
|
|
|
|
g++ \
|
|
|
|
libffi-dev \
|
|
|
|
libjpeg-turbo-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
libxslt-dev \
|
|
|
|
openssl-dev \
|
|
|
|
python3-dev \
|
|
|
|
zlib-dev \
|
|
|
|
&& rm /tmp/requirements.txt \
|
|
|
|
&& rm -rf ~/.cache/pip
|
2016-01-20 09:55:59 +01:00
|
|
|
|
2017-02-10 22:34:51 +01:00
|
|
|
VOLUME /home/mitmproxy/.mitmproxy
|
2014-10-09 19:30:38 +02:00
|
|
|
|
2017-02-10 22:34:51 +01:00
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
2016-09-21 02:31:29 +02:00
|
|
|
|
2017-02-10 22:34:51 +01:00
|
|
|
EXPOSE 8080 8081
|
|
|
|
CMD ["mitmproxy"]
|