Skip to content

Instantly share code, notes, and snippets.

@moredhel
Last active August 31, 2017 09:35
Show Gist options
  • Save moredhel/f7595768711ecb0432e4ce59b0ace605 to your computer and use it in GitHub Desktop.
Save moredhel/f7595768711ecb0432e4ce59b0ace605 to your computer and use it in GitHub Desktop.
Supporting files for blog post https://container-solutions.com/
FROM sameersbn/ubuntu:14.04.20170123
MAINTAINER [email protected]
ENV SQUID_VERSION=3.3.8 \
SQUID_CACHE_DIR=/var/spool/squid3 \
SQUID_LOG_DIR=/var/log/squid3 \
SQUID_USER=proxy
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 80F70E11F0F0D5F10CB20E62F5DA5F09C3173AA6 \
&& echo "deb http://ppa.launchpad.net/brightbox/squid-ssl/ubuntu trusty main" >> /etc/apt/sources.list \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y squid3-ssl=${SQUID_VERSION}* \
&& mv /etc/squid3/squid.conf /etc/squid3/squid.conf.dist \
&& rm -rf /var/lib/apt/lists/*
COPY squid.conf /etc/squid3/squid.conf
COPY entrypoint.sh /sbin/entrypoint.sh
RUN chmod 755 /sbin/entrypoint.sh
EXPOSE 3128/tcp
VOLUME ["${SQUID_CACHE_DIR}"]
ENTRYPOINT ["/sbin/entrypoint.sh"]
{ stdenv, fetchurl, perl, openldap, pam, db, cyrus_sasl, libcap
, expat, libxml2, openssl }:
stdenv.mkDerivation rec {
name = "squid-3.5.27";
src = fetchurl {
url = "http://www.squid-cache.org/Versions/v3/3.5/${name}.tar.xz";
sha256 = "1v7hzvwwghrs751iag90z8909nvyp3c5jynaz4hmjqywy9kl7nsx";
};
buildInputs = [
perl openldap pam db cyrus_sasl libcap expat libxml2 openssl
];
configureFlags = [
"--enable-ipv6"
"--disable-strict-error-checking"
"--disable-arch-native"
"--with-openssl"
"--enable-ssl-crtd"
"--enable-linux-netfilter"
"--enable-storeio=ufs,aufs,diskd,rock"
"--enable-removal-policies=lru,heap"
"--enable-delay-pools"
"--enable-x-accelerator-vary"
];
meta = with stdenv.lib; {
description = "A caching proxy for the Web supporting HTTP, HTTPS, FTP, and more";
homepage = http://www.squid-cache.org;
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ fpletz ];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment