From 77be1b63ce409336821d4e0cc45773308d4a31ab Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 20 Jul 2018 22:49:48 +0200 Subject: [PATCH] Optimize container size by pruning unnecessary package manager data. --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index abc738e..6d4002c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ FROM golang:1.10-stretch # Install software -RUN apt-get update -RUN apt-get install -y bind9 python3 python3-pip +RUN apt-get update \ + && apt-get install -y bind9 python3 python3-pip \ + && apt-get clean all \ + && rm -rf /var/lib/apt/lists/*; ADD requirements.txt /root/ RUN pip3 install -r /root/requirements.txt # Setup bind9