Skip to content

boldare/docker-varnish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Simple Varnish 5.2 image with NCSA logging

Supported Dockerfile tags

Quick start

Requires default VCL config file in /etc/varnish/default.vcl

docker run --volume=default.vcl:/etc/varnish/default.vcl xsolve/varnish

Optional environment variables:

  • VARNISH_NCSA_FORMAT - varnishncsa log format, can be empty, default: %h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i"
  • VARNISH_PORT - port for the server, default 80
  • VARNISH_ADMIN_PORT - port for the admin module, default 81
  • CONFIG_LOCATION - config file location, default /etc/varnish/default.vcl
  • VARNISH_ADDITIONAL_RUN_PARAMS - additional parameters to run varnishd, default is blank the varnish is started with command
varnishd -a 0.0.0.0:${PORT} -T 0.0.0.0:${ADMIN_PORT} -f ${DEFAULT_CONFIG_FILE_LOCATION} ${ADDITIONAL_PARAMS}

Full config example:

docker run --volume=default.vcl:/default.vcl -e CONFIG_LOCATION="/default.vcl" -e VARNISH_NCSA_FORMAT="%h %l %u [%{%FT%T%z}t] %{Varnish:side}x %{Varnish:hitmiss}x \"%r\" %s %b %D %{Varnish:time_firstbyte}x \"%{Referer}i\" \"%{User-agent}i\"" -e VARNISH_PORT=6081 -e VARNISH_ADMIN_PORT=6082 -e VARNISH_ADDITIONAL_RUN_PARAMS="-s malloc,5G" xsolve/varnish

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages