-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
61 lines (45 loc) · 1.52 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
55
56
57
58
59
60
61
FROM debian:stretch
MAINTAINER keopx <keopx@keopx.net>
#
# Step 1: Installation
#
# Set frontend. We'll clean this later on!
ENV DEBIAN_FRONTEND noninteractive
# Set repositories
RUN \
echo "deb http://ftp.de.debian.org/debian/ stretch main non-free contrib" > /etc/apt/sources.list && \
echo "deb-src http://ftp.de.debian.org/debian/ stretch main non-free contrib" >> /etc/apt/sources.list && \
echo "deb http://security.debian.org/ stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
echo "deb-src http://security.debian.org/ stretch/updates main contrib non-free" >> /etc/apt/sources.list && \
apt-get -qq update && apt-get -qqy upgrade
# Update repositories cache and distribution
# Install some basic tools needed for deployment
RUN apt-get -yqq install --no-install-recommends \
curl \
python \
gnupg2 \
ca-certificates
# Configure Varnish-cache sources
RUN \
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish50/script.deb.sh | bash && \
apt-get -qq update
# Install Varnish-cache by Debian stretch version by default use Varnish5
RUN apt-get -yqq install \
varnish --no-install-recommends
#
# Step 3: Clean the system
#
# Cleanup some things
RUN apt-get -q autoclean && \
rm -rf /var/lib/apt/lists/*
#
# Step 4: Run
#
COPY config/default.vcl /etc/varnish/default.vcl
ENV VARNISH_BACKEND_PORT 80
ENV VARNISH_BACKEND_IP 172.17.42.1
ENV VARNISH_PORT 80
ENV VARNISH_MEMORY 100M
EXPOSE 80 6082
COPY scripts/varnish /usr/local/bin/start-varnishd
CMD ["start-varnishd"]