Public | Automated Build

Last pushed: a day ago
Short Description
Varnish Alpine image allowing for custom config file, and templating!
Full Description


A very small Varnish docker image based on Alpine Linux, with

  • Templating support (via gomplate)
  • querystring vmod included

Based upon thiagofigueiro/varnish-alpine-docker

Includes a metrics endpoint suitable for use with Promemetheus, using

Environment variables

  • VARNISH_MEMORY - how much memory Varnish can use for caching. Defaults to 100M.
  • VARNISH_GOMPLATE_FILE - a template file to use, filled in with your environment variables. No default set. Needs VARNISH_CONFIG_FILE set.
  • VARNISH_CONFIG_FILE - path to a VCL file. Use this or the two options below:
  • VARNISH_BACKEND_ADDRESS - host/ip of your backend. Defaults to
  • VARNISH_BACKEND_PORT - TCP port of your backend. Defaults to 80.
  • VARNISH_SKIP_METRICS - Skip exposing a metrics endpoint.

Quick start

Run with defaults:

docker run -Pit --name=varnish-alpine egeland/varnish-alpine-docker

Specify your backend configuration:

docker run -e VARNISH_BACKEND_ADDRESS=a.b.c.d \
           -e VARNISH_BACKEND_PORT=nn \
           -e VARNISH_MEMORY=1G \
           -Pit --name=varnish-alpine egeland/varnish-alpine-docker

Build image locally:

git clone
cd varnish-alpine-docker
docker build -t varnish-alpine-docker .



The Docker image tag corresponds to the Alpine Linux version used. The Varnish
version used is whatever Alpine have packaged.

Image tag Alpine Version Varnish version querystring Gomplate
latest 3.6.0 4.1.3-r0 YES YES
3.6-qs-gotpl-2 3.6.0 4.1.3-r0 YES YES
3.6-querystring 3.6.0 4.1.3-r0 YES NO
3.6, 3 3.6.0 4.1.3-r0 NO NO


Docker Pull Command
Source Repository