Varnish image Dockerfile, based on offical
varnish package provided by
vmod-bodyaccess modules are installed.
Lagoon & OpenShift adaptions¶
This image is prepared to be used on Lagoon which leverages OpenShift. There are therefore some things already done:
- Folder permissions are automatically adapted with
fix-permissionsso this image will work with a random user and therefore also on OpenShift.
Included varnish modules¶
vbox-dynamic- Dynamic Backends from DNS lookups and service discovery from SRV records https://github.com/nigoroll/libvmod-dynamic.
vbox-bodyaccess- Varnish vmod that lets you access the request body https://github.com/aondio/libvmod-bodyaccess.
default.vcl configuration file¶
The image ships a default vcl configuration file, optimized to work on Lagoon.
Some options are configurable via environments variables (see Environment Variables).
Environment variables defined in Varnish base image
||nginx||Default Backend Host|
||8080||Default listening varnish port|
||lagoon_default_secret||Varnish secret used to connect to management|
||5.2||Default version of vmod-dynamic module|
||5.0||Default version of vmod-bodyaccess module|
||8k||Maximum length of any HTTP backend response header|
||32k||Maximum number of bytes of HTTP backend response we will deal with|
||150||Maximum number of objects we attempt to nuke in order to make space for a object body.|
||malloc||Type of varnish cache|
||8080||Default backend server port|
||6082||Default management listening port|