Skip to content

kale1d0code/docker-varnish

 
 

Repository files navigation

GitHub CI build status badge

Official Varnish Docker image

This is the source repository used to build the official Varnish Docker image.

Don't hesitate to open github issues if something is unclear or impractical. You can also join us on discord.

Versions

This repository tracks tree Varnish versions:

  • fresh: the latest release.
  • old: the release before fresh.
  • stable: an Long-Term Support (LTS) release that will receive bug and security fixes even though it's not the latest one.

New major/minor versions are released on the 15th of March and of September, this is when the fresh and stable labels are reevaluated.

In addition, the directory next is a copy of fresh with breaking changes that must wait for the the next release to be published. This image isn't available on the Docker hub.

Building

The docker build directories are under fresh/ (latest), old/ and stable/. Dockerfiles are generated all at once using:

# don't forget to commit them afterward
./populate.sh dockerfiles

Edit ./populate.sh first if you want to modify the labels and installed versions.

To generate the file that will become https://github.com/docker-library/official-images/blob/master/library/varnish, use:

# commit your changes first!
./populate.sh library

Running

When running the Varnish image, a varnishd process will be started that listens on the following ports:

  • port 80 for plain HTTP
  • port 8443 for the PROXY protocol

See TLS section for more information about the primary PROXY protocol use case.

Varnish will run with a default memory storage size of 100M. The VARNISH_SIZE environment variable can be used to extend the size.

TLS

If you want to connect to Varnish via HTTPS, you'll need to terminate the TLS connection elsewhere. TLS termination can be done on some loadbalancers or proxy servers, but the Varnish ecosystem also provides a purpose-built TLS terminator called Hitch.

Hitch supports the PROXY protocol and is transparent to Varnish. The PROXY protocol has the ability to keep track of the original client IP address.

Hitch, or any other TLS terminator that supports the PROXY protocol will connect to Varnish on port 8443.

Image documentation

Please see https://github.com/docker-library/docs/tree/master/varnish

Packages

No packages published

Languages

  • Dockerfile 55.0%
  • Shell 36.1%
  • VCL 8.9%