-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.mitm
More file actions
25 lines (20 loc) · 858 Bytes
/
Dockerfile.mitm
File metadata and controls
25 lines (20 loc) · 858 Bytes
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
FROM alpine:edge as main
RUN apk update\
&& apk upgrade\
&& apk add --no-cache llvm-dev python3 py3-pip build-base gcc g++ musl-dev llvm elfutils-dev zlib-dev rustup libffi-dev openssl-dev python3-dev cargo make linux-headers bsd-compat-headers yaml-dev libc-dev yaml xxhash-dev gcompat glib clang
RUN rustup-init -q -y --default-toolchain nightly\
&& . "$HOME/.cargo/env"\
&& mkdir -p /root/.cargo/lib\
&& rustup component add rust-src rustc-dev llvm-tools-preview\
&& cargo install bpf-linker
RUN . "$HOME/.cargo/env"\
&& mkdir -p /opt/mitmproxy\
&& python3 -m venv /opt/mitmproxy\
&& . /opt/mitmproxy/bin/activate\
&& pip install --upgrade pip\
&& pip install --upgrade mitmproxy --verbose\
&& cd /opt/mitmproxy
RUN mkdir -p /usr/local/bin && \
cp /opt/mitmproxy/bin/mitm* /usr/bin/
FROM scratch
COPY --from=main /opt/mitmproxy /