GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - devilbox/docker-varnish: Devilbox's Varnish Docker Images

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
data
data
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
Dockerfile-4
Dockerfile-4
 
 
Dockerfile-5
Dockerfile-5
 
 
Dockerfile-6
Dockerfile-6
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 

Repository files navigation

Docker Varnish

Build Status Tag Gitter Discourse License

Varnish Docker images for the Devilbox.

Docker Hub Upstream Project

Documentation

In case you seek help, go and visit the community pages.

Documentation

Chat

Forum

devilbox.readthedocs.io gitter.im/devilbox devilbox.discourse.group

Build

# Build Varnish 4
make build-4

# Build Varnish 5
make build-5

# Build Varnish 6
make build-6

Environment variables

Variable Default value Description
VARNISH_CONFIG /etc/varnish/default.vcl Path to Varnish configuration file
CACHE_SIZE 128m Varnish Cache size
VARNISHD_PARAMS -p default_ttl=3600 -p default_grace=3600 Additional Varnish startup parameter
BACKEND_HOST localhost IP or hostname of backend server.

Important: This variable only has effect when using the bundled config. If you change VARNISH_CONFIG you need to hard-code it in your custom configuration.
BACKEND_PORT 80 Port of backend server.

Important: This variable only has effect when using the bundled config. If you change VARNISH_CONFIG you need to hard-code it in your custom configuration.

Mount points

Container path Description
/etc/varnish.d/ Mount your host directory with *.vcl files to this directory when you want to override the varnish config

Ports

By default each Varnish version exposes 6081 as its default listening port.

Default configuration

Credits for default.vcl configuration goes here:

Version Configuration
Varnish 4 https://github.com/mattiasgeniar/varnish-4.0-configuration-templates
Varnish 5 https://github.com/mattiasgeniar/varnish-5.0-configuration-templates
Varnish 6 https://github.com/mattiasgeniar/varnish-6.0-configuration-templates

Available Docker images

Docker image Varnish version
devilbox/varnish:latest Varnish 6
devilbox/varnish:6 Varnish 6
devilbox/varnish:5 Varnish 5
devilbox/varnish:4 Varnish 4

Examples

Use bundled config

Serve Varnish on port 80, use bundled config and forward Varnish requests to a webserver on 192.168.0.1 on port 8080 (which accepts HTTP and not HTTPS):

docker run -it -d --rm \
  -e BACKEND_HOST=192.168.0.1 \
  -e BACKEND_PORT=8080 \
  -p "80:6081" \
  devilbox/varnish:6

Use custom config

Important:

When using a custom config, the BACKEND_HOST and BACKEND_PORT variables will have no effect and you need to ensure to hard-code this in your custom config.

Serve Varnish on port 80, use custom config on host system (/home/users/varnish/my-varnish.vcl) and forward Varnish requests to a webserver on 192.168.0.1 on port 8080 (which accepts HTTP and not HTTPS).

docker run -it -d --rm \
  -e BACKEND_HOST=192.168.0.1 \
  -e BACKEND_PORT=8080 \
  -e VARNISH_CONFIG=/etc/varnish.d/my-varnish.vcl \
  -v "/home/users/varnish/:/etc/varnish.d/" \
  -p "80:6081" \
  devilbox/varnish:6

LICENSE

MIT License

Copyright (c) 2019 cytopia

About

Devilbox's Varnish Docker Images

devilbox.org

Topics

devilboxdockerdocker-imagedockerfilevarnishvarnish-4varnish-5varnish-6

Resources

Readme
MIT license
Activity
Custom properties

Stars

6 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.