From 3bd36b58e58561d1e4a05a69d6273ecb594f9d3f Mon Sep 17 00:00:00 2001 From: David Weinstein Date: Sat, 6 Jun 2015 00:12:29 -0400 Subject: [PATCH] initial add of docker mitmproxy --- .dockerignore | 1 + Dockerfile | 4 ++++ Dockerfile.base-onbuild | 26 ++++++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 Dockerfile.base-onbuild diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..6b8710a71 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.git diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..e06123c78 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM mitmproxy/base:onbuild +EXPOSE 8080 +EXPOSE 8081 +VOLUME /certs diff --git a/Dockerfile.base-onbuild b/Dockerfile.base-onbuild new file mode 100644 index 000000000..6aab378f4 --- /dev/null +++ b/Dockerfile.base-onbuild @@ -0,0 +1,26 @@ +FROM debian:jessie + +ENV DEBIAN_FRONTEND noninteractive +ENV PYTHON /usr/bin/python2.7 + +RUN apt-get update && \ + apt-get install -qq -y --no-install-recommends \ + build-essential \ + python-pip \ + python-dev \ + python-setuptools \ + libffi-dev \ + libxml2-dev \ + libxslt1-dev \ + git \ + zlib1g-dev \ + libssl-dev && \ + rm -rf /var/lib/apt/lists/* + +ENV LANG en_US.UTF-8 +ENV LC_ALL C.UTF-8 + +ONBUILD ADD . /opt/mitmproxy +ONBUILD WORKDIR /opt/mitmproxy +ONBUILD RUN [ ! -e requirements.txt ] || pip install -r requirements.txt && \ + rm -rf ~/.cache/pip /tmp/pip_build_root