-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
54 lines (48 loc) · 1.78 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
ARG ALPINE_VERSION="${ALPINE_VERSION:-3.14}"
FROM alpine:${ALPINE_VERSION}
LABEL maintainer="https://github.com/Hermsi1337"
ARG VARNISH_VERSION="${VARNISH_VERSION:-7.0.0}"
ENV VARNISH_PORT="8080" \
VARNISH_RAM_STORAGE="128M" \
VARNISH_VCL_PATH="/etc/varnish/default.vcl" \
VARNISH_VCL_CONTENT="" \
VARNISH_VCL_DEFAULT_BACKEND="localhost:80" \
VARNISHD_ADDITIONAL_OPTS="" \
VARNISHLOG="false" \
VARNISHLOG_OPTS="" \
VARNISH_VERSION="${VARNISH_VERSION}"
RUN set -x \
&& \
apk add --no-cache --upgrade --virtual .build-dependencies \
autoconf \
automake \
build-base \
cpio \
gzip \
libedit-dev \
libtool \
linux-headers \
py-docutils \
$(if [ "$(echo ${VARNISH_VERSION} | cut -d '.' -f 1-2)" = "6.0" ]; then echo "py-sphinx" ; fi ) \
py3-sphinx \
tar \
sudo \
&& \
apk add --no-cache \
ca-certificates \
pcre-dev \
pcre2-dev \
libunwind-dev \
gcc \
libc-dev \
&& \
cd /tmp && \
wget -qO- \
https://github.com/varnishcache/varnish-cache/archive/refs/tags/varnish-${VARNISH_VERSION}.tar.gz \
| tar -C /tmp --strip-components=1 -xvz \
&& \
sh autogen.sh && sh configure --with-unwind && make && sudo make install \
&& \
apk del .build-dependencies && rm -rf /tmp/* /var/cache/*
COPY bin/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
CMD ["/usr/local/bin/docker-entrypoint"]