-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (25 loc) · 1.18 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
FROM debian:stretch-slim
LABEL name="Varnish Cache" \
version="5.2.1" \
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 5.2.1
COPY start.sh /usr/bin/start-varnish
# Retrieve Varnish from
# https://packagecloud.io/varnishcache/varnish5/packages/debian/stretch/varnish_5.2.1-1~stretch_amd64.deb
RUN 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/varnish5/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