This base container is not currently aimed at public consumption. It exists as a starting point for August Ash containers.
4.0.0
,latest
(Dockerfile)3.0.0
(Dockerfile)2.0.0
(Dockerfile)1.0.2
(Dockerfile)1.0.1
(Dockerfile)1.0.0
(Dockerfile)
See VERSIONS.md for image contents.
Launch an application container and Varnish container that serves content proxied to the app
container:
docker run --rm \
--name app \
--net <NETWORK NAME> \
-v $(pwd):/src \
augustash/alpine-nginx
docker run --rm \
-p 8080:80 \
--link <APP CONTAINER>:app \
--net <NETWORK NAME> \
-e VARNISH_BACKEND_HOST=app \
-v $(pwd)/varnish.template:/etc/varnish/default.vcl \
augustash/alpine-varnish
The image is prepared in a way to make it relatively easy to customize Varnish. Custom configuration should be mounted as /etc/varnish/default.vcl
.
docker run --rm \
-v $(pwd)/varnish.template:/etc/varnish/default.vcl \
augustash/alpine-varnish
To help avoid nasty permissions errors, the container allows you to specify your own PUID
and PGID
. This can be a user you've created or even root (not recommended).
The following variables can be set and will change how the container behaves. You can use the -e
flag, an environment file, or your Docker Compose file to set your preferred values. The default values are shown:
PUID
=501PGID
=1000VARNISH_VCL_CONF
=/etc/varnish/default.vclVARNISH_SECRET_FILE
=/etc/varnish/secretVARNISH_LISTEN_PORT
=80VARNISH_ADMIN_LISTEN_PORT
=6082VARNISH_BACKEND_PORT
=80VARNISH_BACKEND_HOST
=webVARNISH_CACHE_SIZE
=64MVARNISHD_PARAMS
=-p default_ttl=3600 -p default_grace=3600
The output of varnishncsa
is piped to the standard output of the container, allowing the docker daemon to read it and direct that data to anywhere you wish.
The default format, set via the environment variable VARNISH_LOG_FORMAT
, that is passed to varnishncsa
:
%{x-forwarded-for}i - %u %t "%r" %s %b %T "%{Referer}i" "%{User-agent}i" [%{Varnish:handling}x]