A Docker container with Varnish 4.x built on top of Debian 8
1M+
A Docker container with Varnish 8.0 built on top of Debian 12
Debian 12
Varnish 8.0
You'll need a custom vcl file and a Varnish secret file to use this container. You can either (re)build the image with those files or you can mount a host directory when running the container.
docker build -t v8.0 .
docker run -d \
-v ./:/etc/varnish \
--env 'VARNISH_PARAMS=-p pipe_timeout=1440 -p syslog_cli_traffic=off -p feature=+esi_ignore_https' \
--env 'VARNISH_STORAGE=malloc,1G' \
--name cs2agvarnish \
-p 8080:80 \
-p 8081:6082 \
varnish:v8.0
You can configure Varnish daemon by passing following environment variables with docker run command:
VARNISH_PARAMS
-p pipe_timeout=1440 -p syslog_cli_traffic=off -p feature=+esi_ignore_https
VARNISH_STORAGEmalloc,1G
You can mount a host directory which contains at least the vcl and the secrect file. The files must have the following names:
default.vcl
secret
-v
/srv/www/varnish_config:/etc/varnish
The following ports can be exposed in order to use Varnish on container host:
80
Varnish port6082Varnish admin port
docker container exec CONTAINER_NAME '/usr/sbin/varnishreload'
Content type
Image
Digest
sha256:e45a9ab26…
Size
176.3 MB
Last updated
about 1 month ago
docker pull cs2ag/docker-varnish