Skip to content

Commit b35a23d

Browse files
committed
Add docker file varnish
1 parent 3445b5b commit b35a23d

3 files changed

Lines changed: 458 additions & 0 deletions

File tree

varnish/Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM debian:latest
2+
MAINTAINER ZeroC0D3 Team<zeroc0d3.team@gmail.com>
3+
4+
# Set Environment Variables
5+
ENV DEBIAN_FRONTEND noninteractive
6+
7+
# Install Dependencies
8+
RUN apt-get update && apt-get install -y apt-utils && apt-get upgrade -y
9+
RUN mkdir /home/site && mkdir /home/site/cache
10+
RUN apt-get install -y varnish
11+
RUN rm -rf /var/lib/apt/lists/*
12+
13+
# Setting Configurations
14+
ENV VARNISH_CONFIG /etc/varnish/default.vcl
15+
ENV CACHE_SIZE 128m
16+
ENV VARNISHD_PARAMS -p default_ttl=3600 -p default_grace=3600
17+
ENV VARNISH_PORT 6081
18+
ENV BACKEND_HOST localhost
19+
ENV BACKEND_PORT 80
20+
21+
ADD default.vcl /etc/varnish/default.vcl
22+
ADD start.sh /etc/varnish/start.sh
23+
24+
RUN chmod +x /etc/varnish/start.sh
25+
26+
CMD ["/etc/varnish/start.sh"]

0 commit comments

Comments
 (0)