-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (26 loc) · 1.24 KB
/
Dockerfile
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
FROM debian:stretch-slim
LABEL name="Varnish Cache" \
version="6.4.0" \
homepage="http://varnish-cache.org/" \
maintainer="Christos Manios <maniopaido@gmail.com>"
ENV VCL_CONFIG /etc/varnish/default.vcl
ENV CACHE_SIZE 64m
ENV VARNISHD_PARAMS -p default_ttl=3600 -p default_grace=3600
ENV VARNISH_VERSION 6.4.0
COPY start.sh /usr/bin/start-varnish
# Retrieve Varnish from
#https://packagecloud.io/varnishcache/varnish64/packages/debian/stretch/varnish_6.4.0-1~stretch_amd64.deb/download.deb
RUN VARNISH_URL_VERSION="64" \
&& apt-get update \
&& apt-get install -y wget libjemalloc1 libncurses5 gcc libc6-dev \
libc6.1-dev-alpha-cross libc-dev libedit2 libbsd0 \
&& wget --content-disposition https://packagecloud.io/varnishcache/varnish${VARNISH_URL_VERSION}/packages/debian/stretch/varnish_${VARNISH_VERSION}-1~stretch_amd64.deb/download.deb \
&& dpkg -i varnish_${VARNISH_VERSION}-1~stretch_amd64.deb \
&& rm -rf /var/lib/apt/lists/* \
&& rm -f varnish_${VARNISH_VERSION}-1~stretch_amd64.deb \
&& mkdir -p "/orig/conf" \
&& cp -Rp /etc/varnish/* /orig/conf \
&& chmod 755 /usr/bin/start-varnish \
&& update-rc.d -f varnish remove
CMD ["start-varnish"]
EXPOSE 6081