From: Peter van Dijk Date: Fri, 16 Oct 2020 21:23:20 +0000 (+0200) Subject: switch to debian-slim, reduces each image by almost 50MB X-Git-Tag: auth-4.4.0-alpha2~2^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf35d4615fd361ceee771d73af4dbf6d1c78c316;p=thirdparty%2Fpdns.git switch to debian-slim, reduces each image by almost 50MB --- diff --git a/Dockerfile-auth b/Dockerfile-auth index ee95298852..6204d45637 100644 --- a/Dockerfile-auth +++ b/Dockerfile-auth @@ -1,5 +1,5 @@ # our chosen base image -FROM debian:10 AS builder +FROM debian:10-slim AS builder # TODO: make sure /source looks roughly the same from git or tar @@ -45,13 +45,13 @@ RUN cd /tmp && mkdir /build/tmp/ && mkdir debian && \ dpkg-deb -I equivs-dummy_1.0_all.deb && cp equivs-dummy_1.0_all.deb /build/tmp/ # Runtime -FROM debian:10 +FROM debian:10-slim # Reusable layer for base update - Should be cached from builder RUN apt-get update && apt-get -y dist-upgrade && apt-get clean # Ensure python3 is present (for startup script), and sqlite3 (for db schema), and tini (for signal management) -RUN apt-get install -y python3 sqlite3 tini && apt-get clean +RUN apt-get install -y python3 sqlite3 tini libcap2-bin && apt-get clean # Output from builder COPY --from=builder /build / diff --git a/Dockerfile-dnsdist b/Dockerfile-dnsdist index 761bc7eab3..88b3d2df05 100644 --- a/Dockerfile-dnsdist +++ b/Dockerfile-dnsdist @@ -1,5 +1,5 @@ # our chosen base image -FROM debian:10 AS builder +FROM debian:10-slim AS builder # TODO: make sure /source looks roughly the same from git or tar @@ -48,13 +48,13 @@ RUN cd /tmp && mkdir /build/tmp/ && mkdir debian && \ # Runtime -FROM debian:10 +FROM debian:10-slim # Reusable layer for base update - Should be cached from builder RUN apt-get update && apt-get -y dist-upgrade && apt-get clean # Ensure python3 is present (for startup script), and python3-atomicwrites (for backend management), and tini (for signal management) -RUN apt-get install -y python3 python3-atomicwrites tini && apt-get clean +RUN apt-get install -y python3 python3-atomicwrites tini libcap2-bin && apt-get clean # Output from builder COPY --from=builder /build / diff --git a/Dockerfile-recursor b/Dockerfile-recursor index cf92515642..dde1e1b97c 100644 --- a/Dockerfile-recursor +++ b/Dockerfile-recursor @@ -5,7 +5,7 @@ # dig a www.example.com @0 -p 1053 # Builder -FROM debian:10 AS builder +FROM debian:10-slim AS builder # Reusable layer for base update RUN apt-get update && apt-get -y dist-upgrade && apt-get clean @@ -54,13 +54,13 @@ RUN cd /tmp && mkdir /build/tmp/ && mkdir debian && \ dpkg-deb -I equivs-dummy_1.0_all.deb && cp equivs-dummy_1.0_all.deb /build/tmp/ # Runtime -FROM debian:10 +FROM debian:10-slim # Reusable layer for base update - Should be cached from builder RUN apt-get update && apt-get -y dist-upgrade && apt-get clean # Ensure python3 is present (for startup script), and tini for signal management -RUN apt-get install -y python3 tini && apt-get clean +RUN apt-get install -y python3 tini libcap2-bin && apt-get clean # Executables from builder COPY --from=builder /build /