Should only use `ADD` for URLs (and even then, `curl` or `wget` are preferred, for numerous reasons, even within this repo) and when extracting archive contents as part of the `ADD` operation; otherwise `COPY` is clearer and (slightly) more efficient.
		
			
				
	
	
		
			30 lines
		
	
	
		
			744 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			744 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
FROM debian:latest
 | 
						|
 | 
						|
LABEL maintainer="ZeroC0D3 Team<zeroc0d3.team@gmail.com>"
 | 
						|
 | 
						|
# Set Environment Variables
 | 
						|
ENV DEBIAN_FRONTEND noninteractive
 | 
						|
 | 
						|
# Install Dependencies
 | 
						|
RUN apt-get update && apt-get install -y apt-utils && apt-get upgrade -y
 | 
						|
RUN mkdir /home/site && mkdir /home/site/cache
 | 
						|
RUN apt-get install -y varnish
 | 
						|
RUN rm -rf /var/lib/apt/lists/*
 | 
						|
 | 
						|
# Setting Configurations
 | 
						|
ENV VARNISH_CONFIG  /etc/varnish/default.vcl
 | 
						|
ENV CACHE_SIZE      128m
 | 
						|
ENV VARNISHD_PARAMS -p default_ttl=3600 -p default_grace=3600
 | 
						|
ENV VARNISH_PORT    6081
 | 
						|
ENV BACKEND_HOST    localhost
 | 
						|
ENV BACKEND_PORT    80
 | 
						|
 | 
						|
COPY default.vcl /etc/varnish/default.vcl
 | 
						|
COPY start.sh /etc/varnish/start.sh
 | 
						|
 | 
						|
RUN chmod +x /etc/varnish/start.sh
 | 
						|
 | 
						|
CMD ["/etc/varnish/start.sh"]
 | 
						|
 | 
						|
EXPOSE 8080
 |