From 53c2700a4d117400f41c0bf094b71019f98e9dfc Mon Sep 17 00:00:00 2001 From: kenorb Date: Mon, 20 May 2019 15:10:15 +0100 Subject: [PATCH] Allows access to localnet [GH-59] --- Dockerfile | 3 +++ entrypoint.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 "$@"