diff --git a/Dockerfile b/Dockerfile index a727571..e696f27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,9 @@ RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y squid=${SQUID_VERSION}* \ && rm -rf /var/lib/apt/lists/* +# Allow localnet to access proxy. +RUN sed -i "s/^#\+\(.*[acl|allow] localnet\)/\1/" /etc/squid/squid.conf + COPY entrypoint.sh /sbin/entrypoint.sh RUN chmod 755 /sbin/entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh index 7991227..e38c773 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -30,7 +30,7 @@ if [[ -z ${1} ]]; then echo "Initializing cache..." $(which squid) -N -f /etc/squid/squid.conf -z fi - echo "Starting squid..." + echo "Starting squid on $(hostname -I) ($(hostname):3128)..." exec $(which squid) -f /etc/squid/squid.conf -NYCd 1 ${EXTRA_ARGS} else exec "$@"