Last active
March 27, 2019 09:16
-
-
Save yottta/7af8ead7a4ae2d8799f69e61a83cc392 to your computer and use it in GitHub Desktop.
Medium article about WebSockets throughout Varnish - varnish Dockerfile 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:jessie | |
RUN \ | |
useradd -r -s /bin/false varnishd | |
# Install Varnish source build dependencies. | |
RUN \ | |
apt-get update && apt-get install -y --no-install-recommends \ | |
automake \ | |
build-essential \ | |
ca-certificates \ | |
wget \ | |
curl \ | |
python3-sphinx \ | |
libedit-dev \ | |
libjemalloc-dev \ | |
libncurses-dev \ | |
libpcre3-dev \ | |
libtool \ | |
pkg-config \ | |
python-docutils \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Install Varnish from source, so that Varnish modules can be compiled and installed. | |
ENV VARNISH_VERSION=6.2.0 | |
RUN \ | |
apt-get update && \ | |
mkdir -p /usr/local/src && \ | |
cd /usr/local/src && \ | |
wget https://github.com/varnishcache/varnish-cache/archive/varnish-${VARNISH_VERSION}.tar.gz && \ | |
tar -xzf varnish-$VARNISH_VERSION.tar.gz && \ | |
cd varnish-cache-varnish-$VARNISH_VERSION && \ | |
./autogen.sh && \ | |
./configure && \ | |
make install && \ | |
rm ../varnish-$VARNISH_VERSION.tar.gz | |
COPY user.vcl /etc/varnish/user.vcl | |
WORKDIR /etc/varnish | |
ENTRYPOINT ["varnishd", "-F", "-a", ":6081", "-T", "localhost:6082", "-f", "/etc/varnish/user.vcl", "-s", "malloc,256m"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment