Public Repository

Last pushed: 2 years ago
Short Description
Base image to run a Varnish server
Full Description

tutum-docker-varnish

Base image to run a Varnish server

Usage

If your content server is using port 80 and you want to run it with the default rules:

docker run -d --name backend tutum/hello-world
docker run -d --link backend -p 80:80 tutum/varnish

Go to http://localhost/ and you will get a superfast cached version of a hello world!

If your content server is using a port different than 80 (i.e. 8080) and you want to run it with the default rules:

docker run -d --link backend -e BACKEND_PORT=8080 -p 80:80 tutum/varnish

If you want to use your own custom VCL file:

docker run -d -e CONTENT="-f /etc/varnish/default.vcl" -v $PWD/default.vcl:/etc/varnish/default.vcl -p 80:80 tutum/varnish

If you want to use your own custom VCL file passing in its contents:

docker run -d -e CONTENT_VCL="`awk 1 ORS='\\n' file.vcl`" -p 80:80 tutum/varnish

Tags available

  • tutum/varnish:3.0 for latest 3.0.x release
  • tutum/varnish:4.0 for latest 4.0.x release
Docker Pull Command
Owner
tutum

Comments (1)
peterkozakpoc
2 months ago

Just FYI: here is the link to the source code https://github.com/tutumcloud/varnish

It can help you to define some custom parameters for varnishd