Requires default VCL config file in /etc/varnish/default.vcl
docker run --volume=default.vcl:/etc/varnish/default.vcl xsolve/varnish
- VARNISH_NCSA_FORMAT - varnishncsa log format, can be empty, default:
%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i"
- VARNISH_PORT - port for the server, default 80
- VARNISH_ADMIN_PORT - port for the admin module, default 81
- CONFIG_LOCATION - config file location, default
/etc/varnish/default.vcl
- VARNISH_ADDITIONAL_RUN_PARAMS - additional parameters to run varnishd, default is blank the varnish is started with command
varnishd -a 0.0.0.0:${PORT} -T 0.0.0.0:${ADMIN_PORT} -f ${DEFAULT_CONFIG_FILE_LOCATION} ${ADDITIONAL_PARAMS}
docker run --volume=default.vcl:/default.vcl -e CONFIG_LOCATION="/default.vcl" -e VARNISH_NCSA_FORMAT="%h %l %u [%{%FT%T%z}t] %{Varnish:side}x %{Varnish:hitmiss}x \"%r\" %s %b %D %{Varnish:time_firstbyte}x \"%{Referer}i\" \"%{User-agent}i\"" -e VARNISH_PORT=6081 -e VARNISH_ADMIN_PORT=6082 -e VARNISH_ADDITIONAL_RUN_PARAMS="-s malloc,5G" xsolve/varnish