-
Where to get help:
the Docker Community Forums, the Docker Community Slack, or Stack Overflow -
Where to file issues:
https://github.com/varnish/docker-varnish/issues -
Maintained by:
the Varnish Docker Community -
Published image artifact details:
repo-info repo'srepos/varnish/
directory (history)
(image metadata, transfer size, etc) -
Image updates:
official-images PRs with labellibrary/varnish
official-images repo'slibrary/varnish
file (history) -
Source of this description:
docs repo'svarnish/
directory (history)
Varnish is an HTTP accelerator designed for content-heavy dynamic web sites as well as APIs. In contrast to other web accelerators, such as Squid, which began life as a client-side cache, or Apache and nginx, which are primarily origin servers, Varnish was designed as an HTTP accelerator. Varnish is focused exclusively on HTTP, unlike other proxy servers that often support FTP, SMTP and other network protocols.
Create a default.vcl
file:
vcl 4.0;
backend default {
.host = "www.nytimes.com:80";
}
Then run:
$ docker run --name my-running-varnish -v /path/to/default.vcl:/etc/varnish/default.vcl:ro --tmpfs /usr/local/var/varnish:exec -d varnish
Alternatively, a simple Dockerfile
can be used to generate a new image that includes the necessary default.vcl
(which is a much cleaner solution than the bind mount above):
FROM varnish:6.2
COPY default.vcl /etc/varnish/
Place this file in the same directory as your default.vcl
, run docker build -t my-varnish .
, then start your container:
$ docker run --name my-running-varnish --tmpfs /var/lib/varnish:exec -d my-varnish
$ docker run --name my-running-varnish --tmpfs /usr/local/var/varnish:exec -d -p 8080:80 my-varnish
Then you can hit http://localhost:8080
or http://host-ip:8080
in your browser.
View license information for the software contained in this image.
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
Some additional license information which was able to be auto-detected might be found in the repo-info
repository's varnish/
directory.
As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.