Update to squid 4.0.21.

Also use bash traps to signal shutdown to squid.
This commit is contained in:
Will Rouesnel 2017-08-14 11:45:35 +10:00
parent b33af30255
commit 81f102c4af
2 changed files with 11 additions and 3 deletions

View File

@ -4,7 +4,7 @@ RUN sed s:deb:deb-src: /etc/apt/sources.list >> /etc/apt/sources.list
RUN apt-get update && apt-get build-dep -y squid3 && apt-get install -y wget tar xz-utils libssl-dev
ARG SQUID_VERSION=4.0.13
ARG SQUID_VERSION=4.0.21
# TODO: verify the squid download with the signing key
RUN mkdir /src \

View File

@ -106,8 +106,16 @@ if [ "$PROXYCHAIN" = "yes" ]; then
exit 1
fi
# Start squid with proxychains
exec proxychains4 squid -N
proxychains4 squid -N &
PID=$!
else
# Start squid normally
exec squid -N
squid -N &
PID=$!
fi
# This construct allows signals to kill the container successfully.
trap "kill -TERM $PID" INT TERM
wait $PID
wait $PID
exit $?