If you just wish to try out Varnish Enterprise, or if your account requires a license file, the easiest way to open a Varnish Enterprise image is using the varnish/enterprise image on the Docker Hub:
# docker is obviously a required
docker pull varnish/enterprise
If you’d like to contribute, you can check out the source code to build the container on github.
You can then run the image:
# simply run it with the default configuration
docker run -p 8080:80 varnish/enterprise
# using a different VCL and license
docker run -p 8080:80 -v /tmp/default.vcl:/etc/varnish/default.vcl -v /tmp/varnish-enterprise.lic:/etc/varnish/varnish-enterprise.lic varnish/enterprise
# if the first argument starts with a "-", all the arguments are appended to the default varnishd command
docker run -p 8080:8080 varnish/enterprise -a :8080 -p default_ttl=90
# otherwise the arguments are understood as a command to run instead of varnishd:
docker run varnish/enterprise echo "Hello, World!"
Some parameteres can be modified at runtime using environment variables. Some of these may requiring a more extensive license than the one bundled in the container, they are marked with a * in the list below:
VARNISH_STORAGE_BACKEND (malloc): dictate which caching storage to use (passed to the -s argument). Can be either malloc or mse4VARNISH_SIZE (depends): how big should hte cache be
VARNISH_STORAGE_BACKEND=malloc, defaults to 100MBVARNISH_STORAGE_BACKEND=mse4, default to 80%, using memory_governorVARNISH_VCL_FILE (etc/varnish/default.vcl): which VCL file to loadVARNISH_HTTP_PORT (80): which port to listen on for HTTP trafficVARNISH_PROXY_PORT (8444): which port to listen on for PROXY trafficMSE4_CONFIG*: path to an mse4 configuraiton file, implies VARNISH_STORAGE_BACKEND=mse4MSE4_CACHE_FORCE_PRESERVE*: when calling mkfs.mse4 (if MSE4_CONFIG is set), use the -f switchNote that the images also defines the VMOD_DEPS that contains required packages to compile C vmods.