From 3d88e1460f2183696a9da2db23539e6c60394f7e Mon Sep 17 00:00:00 2001 From: Will Rouesnel Date: Fri, 22 Dec 2017 10:55:37 +1100 Subject: [PATCH] Normalize source files within the image. --- docker-squid/Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docker-squid/Dockerfile b/docker-squid/Dockerfile index 1ea92f4..952e881 100644 --- a/docker-squid/Dockerfile +++ b/docker-squid/Dockerfile @@ -1,6 +1,14 @@ FROM ubuntu:zesty -RUN apt-get update && apt-get build-dep -y squid && apt-get install -y wget tar xz-utils libssl-dev +# Normalize apt sources +RUN cat /etc/apt/sources.list | grep -v '^#' | sed /^$/d | sort | uniq > sources.tmp.1 && \ + cat /etc/apt/sources.list | sed s/deb\ /deb-src\ /g | grep -v '^#' | sed /^$/d | sort | uniq > sources.tmp.2 && \ + cat sources.tmp.1 sources.tmp.2 > /etc/apt/sources.list && \ + rm -f sources.tmp.1 sources.tmp.2 + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get build-dep -y squid && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y wget tar xz-utils libssl-dev ARG SQUID_VERSION=4.0.21