Skip to content

Commit 75bc9e0

Browse files
committed
Move apk add and del into same layer
Prevents bloating of final image
1 parent 8ad0aaa commit 75bc9e0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ FROM rpardini/nginx-proxy-connect-stable-alpine:nginx-1.14.0-alpine-3.8
44

55
# Add openssl, bash and ca-certificates, then clean apk cache -- yeah complain all you want.
66
# Also added deps for mitmproxy.
7-
RUN apk add --update openssl bash ca-certificates su-exec git g++ libffi libffi-dev libstdc++ openssl openssl-dev python3 python3-dev
8-
RUN LDFLAGS=-L/lib pip3 install mitmproxy
9-
RUN apk del --purge git g++ libffi-dev openssl-dev python3-dev && rm -rf /var/cache/apk/* && rm -rf ~/.cache/pip
7+
RUN apk add --update openssl bash ca-certificates su-exec git g++ libffi libffi-dev libstdc++ openssl openssl-dev python3 python3-dev \
8+
&& LDFLAGS=-L/lib pip3 install mitmproxy \
9+
&& apk del --purge git g++ libffi-dev openssl-dev python3-dev \
10+
&& rm -rf /var/cache/apk/* \
11+
&& rm -rf ~/.cache/pip
1012

1113
# Required for mitmproxy
1214
ENV LANG=en_US.UTF-8

0 commit comments

Comments
 (0)