This repository has been archived by the owner on Jun 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
64 lines (57 loc) · 1.62 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM debian:stretch-slim
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8
RUN apt-get update && apt-get install -y --no-install-recommends \
athena-jot \
bridge-utils \
build-essential \
ca-certificates \
curl \
iproute2 \
iptables \
libexpat-dev \
libffi-dev \
libmpdec2 \
libssl-dev\
mime-support \
net-tools \
procps \
qemu-kvm \
qemu-utils \
ssh \
sudo \
tcpdump \
uml-utilities \
&& rm -rf /var/lib/apt/lists/*
ARG py36_url="https://github.com/chriskuehl/python3.6-debian-stretch/releases/download/v3.6.2-1-deb9u1"
ARG py36_pkgs="\
python3.6_3.6.2-1.deb9u1_amd64 \
python3.6-minimal_3.6.2-1.deb9u1_amd64 \
python3.6-dev_3.6.2-1.deb9u1_amd64 \
libpython3.6_3.6.2-1.deb9u1_amd64 \
libpython3.6-minimal_3.6.2-1.deb9u1_amd64 \
libpython3.6-stdlib_3.6.2-1.deb9u1_amd64 \
libpython3.6-dev_3.6.2-1.deb9u1_amd64 \
"
RUN for pkg in ${py36_pkgs}; do curl -OL "${py36_url}/${pkg}.deb"; done \
&& dpkg -i *.deb \
&& rm *.deb
COPY Pipfile Pipfile.lock /pipenv/
WORKDIR /pipenv
RUN ln -fs /usr/bin/python3.6 /usr/bin/python3 \
&& groupadd mitm \
&& useradd --gid mitm --create-home mitm \
&& curl -OL https://bootstrap.pypa.io/get-pip.py \
&& python3 get-pip.py \
&& pip3 install pipenv \
&& mkdir /certs \
&& chown -R mitm:mitm /certs /pipenv \
&& sudo -u mitm pipenv install --three \
&& ln -s /pipenv/api $(sudo -u mitm pipenv --venv)/lib/python3.6/site-packages/
COPY start.sh /usr/local/bin
COPY start.py /pipenv
COPY api /pipenv/api
COPY flows /pipenv/flows
COPY fixtures/rsa /unsafe_keys
ENTRYPOINT ["/usr/local/bin/start.sh"]
EXPOSE 2222 5555