mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
cleanup mitmproxy
Signed-off-by: Jess Frazelle <acidburn@github.com>
This commit is contained in:
parent
ddc723c9b9
commit
c160d3c94f
|
@ -121,6 +121,7 @@ keepassxreboot/keepassxc
|
||||||
robertdavidgraham/masscan
|
robertdavidgraham/masscan
|
||||||
MidnightCommander/mc
|
MidnightCommander/mc
|
||||||
zyedidia/micro
|
zyedidia/micro
|
||||||
|
mitmproxy/mitmproxy
|
||||||
hashicorp/nomad
|
hashicorp/nomad
|
||||||
zeit/now-cli
|
zeit/now-cli
|
||||||
nzbget/nzbget
|
nzbget/nzbget
|
||||||
|
|
|
@ -1,50 +1,29 @@
|
||||||
FROM alpine:latest
|
FROM debian:buster-slim
|
||||||
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
||||||
|
|
||||||
ENV LANG=en_US.UTF-8
|
ENV LANG=en_US.UTF-8
|
||||||
|
|
||||||
COPY requirements.txt /tmp/requirements.txt
|
RUN apt-get update && apt-get install -y \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
--no-install-recommends \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# add our user first to make sure the ID get assigned consistently,
|
# Add our user first to make sure the ID get assigned consistently,
|
||||||
# regardless of whatever dependencies get added
|
# regardless of whatever dependencies get added.
|
||||||
RUN addgroup -S mitmproxy && adduser -S -G mitmproxy mitmproxy \
|
RUN groupadd -r mitmproxy && useradd -r -g mitmproxy mitmproxy \
|
||||||
&& apk add --no-cache \
|
&& mkdir -p /home/mitmproxy/.mitmproxy \
|
||||||
su-exec \
|
&& chown -R mitmproxy:mitmproxy /home/mitmproxy
|
||||||
git \
|
|
||||||
g++ \
|
# Download the binaries.
|
||||||
libffi \
|
ENV MITMPROXY_VERSION 4.0.4
|
||||||
libffi-dev \
|
RUN curl -sSL "https://snapshots.mitmproxy.org/${MITMPROXY_VERSION}/mitmproxy-${MITMPROXY_VERSION}-linux.tar.gz" | tar -vxzC /usr/local/bin
|
||||||
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
|
|
||||||
|
|
||||||
VOLUME /home/mitmproxy/.mitmproxy
|
VOLUME /home/mitmproxy/.mitmproxy
|
||||||
|
|
||||||
COPY docker-entrypoint.sh /usr/local/bin/
|
COPY docker-entrypoint.sh /usr/local/bin/
|
||||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
||||||
|
|
||||||
EXPOSE 8080 8081
|
EXPOSE 8080 8081
|
||||||
|
|
||||||
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
CMD ["mitmproxy"]
|
CMD ["mitmproxy"]
|
||||||
|
|
|
@ -4,10 +4,10 @@ set -e
|
||||||
MITMPROXY_PATH="/home/mitmproxy/.mitmproxy"
|
MITMPROXY_PATH="/home/mitmproxy/.mitmproxy"
|
||||||
|
|
||||||
if [ "$1" = "mitmdump" ] || [ "$1" = "mitmproxy" ] || [ "$1" = "mitmweb" ]; then
|
if [ "$1" = "mitmdump" ] || [ "$1" = "mitmproxy" ] || [ "$1" = "mitmweb" ]; then
|
||||||
mkdir -p "$MITMPROXY_PATH"
|
mkdir -p "$MITMPROXY_PATH"
|
||||||
chown -R mitmproxy:mitmproxy "$MITMPROXY_PATH"
|
chown -R mitmproxy:mitmproxy "$MITMPROXY_PATH"
|
||||||
|
|
||||||
su-exec mitmproxy "$@"
|
su mitmproxy -c "$@"
|
||||||
else
|
else
|
||||||
exec "$@"
|
exec "$@"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
git+https://github.com/mitmproxy/mitmproxy.git@master
|
|
Loading…
Reference in New Issue
Block a user