-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (43 loc) · 1.79 KB
/
Dockerfile
File metadata and controls
49 lines (43 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM studionone/apache-php:8.1
ENV VARNISH_VERSION 7.0.1-1~stretch
# Varnish is being installed from source because we need to VCL mod to allow for dynamic configurations
RUN apt-get update && apt-get install -y \
autoconf \
automake \
autotools-dev \
libedit-dev \
libjemalloc-dev \
libncurses-dev \
libpcre3-dev \
libvarnishapi-dev \
libtool \
pkg-config \
sphinx-doc \
sphinx-common \
apt-transport-https \
debian-archive-keyring \
wget
# Add the Varnish Cache gpg key to the keyring used by APT:
RUN wget https://packagecloud.io/varnishcache/varnish70/gpgkey -O - | apt-key add - \
&& echo "deb https://packagecloud.io/varnishcache/varnish70/debian/ stretch main" | tee -a /etc/apt/sources.list.d/varnishcache_varnish70.list \
&& echo "deb-src https://packagecloud.io/varnishcache/varnish70/debian/ stretch main" | tee -a /etc/apt/sources.list.d/varnishcache_varnish70.list \
&& echo "deb http://ftp.au.debian.org/debian stretch main " | tee -a /etc/apt/sources.list # to install libjemalloc1
# Varnish
RUN apt-get update && apt-get install -y --no-install-recommends \
varnish=$VARNISH_VERSION \
varnish-dev=$VARNISH_VERSION
# Varnish querystring module
RUN cd /tmp \
&& wget https://github.com/Dridi/libvmod-querystring/releases/download/v2.0.3/vmod-querystring-2.0.3.tar.gz \
&& tar xfz vmod-querystring-2.0.3.tar.gz \
&& rm -rf /tmp/vmod-querystring-2.0.3.tar.gz \
&& cd /tmp/vmod-querystring-2.0.3 \
&& sh configure \
&& make \
&& make install \
&& cd ../ \
&& rm -rf /tmp/vmod-querystring-2.0.3 \
&& ldconfig
# Varnish defult configuration file
COPY conf/default.vcl.m4 /opt/default.vcl.m4
COPY conf/supervisor_conf.d/varnish.conf /etc/supervisor/conf.d/varnish.conf