-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
22 lines (18 loc) · 791 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Inspired by state of this file https://github.com/TankMasterRL/docker-squid
FROM debian:stretch
LABEL maintainer="Robin Larsson <[email protected]>"
# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#use-multi-stage-builds
RUN apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install -y squid3 \
&& mv /etc/squid/squid.conf /etc/squid/squid.conf.dist
ENV SQUID_CACHE_DIR=/var/spool/squid \
SQUID_LOG_DIR=/var/log/squid \
SQUID_USER=proxy
COPY squid.conf /etc/squid/squid.conf
COPY entrypoint.sh /sbin/entrypoint.sh
RUN chmod 755 /sbin/entrypoint.sh
EXPOSE 3128/tcp
# https://docs.docker.com/compose/faq/#why-do-my-services-take-10-seconds-to-recreate-or-stop
VOLUME ["${SQUID_CACHE_DIR}"]
ENTRYPOINT ["/sbin/entrypoint.sh"]