centos/varnish-6-centos7
Platform for running Varnish or building Varnish-based application
500K+
This container image includes Varnish 6.0 Cache server and a reverse proxy for OpenShift and general usage. Users can choose between RHEL, CentOS and Fedora based images. The RHEL images are available in the Red Hat Container Catalog, the CentOS images are available on Docker Hub, and the Fedora images are available in Fedora Registry. The resulting image can be run using podman.
Note: while the examples in this README are calling podman
, you can replace any such calls by docker
with the same arguments
Varnish available as container is a base platform for running Varnish server or building Varnish-based application. Varnish Cache stores web pages in memory so web servers don't have to create the same web page over and over again. Varnish Cache serves pages much faster than any application server, giving the website a significant speed up.
The image can be used as a base image for other applications based on Varnish Cache 6.0 using Openshift's s2i feature.
For this, we will assume that you are using the rhscl/varnish-6-rhel7 image
, available via varnish:6
imagestream tag in Openshift.
Building a simple sample-app application
in Openshift can be achieved with the following step:
```
oc new-app varnish:6~https://github.com/sclorg/varnish-container.git --context-dir=6/test/test-app/
```
The same application can also be built using the standalone S2I application on systems that have it available:
```
$ s2i build https://github.com/sclorg/varnish-container.git --context-dir=6/test/test-app/ rhscl/varnish-6-rhel7 sample-server
```
Accessing the application:
$ curl 127.0.0.1:8080
No further configuration is required.
The Varnish Cache 6.0 Container image supports the S2I tool (see Usage section). Note that the default.vcl configuration file in the directory accessed by S2I needs to be in the VCL format.
No special environment variables or volumes available.
Varnish logs into standard output, so the log is available in the container log. The log can be examined by running:
podman logs <container>
Dockerfile and other sources for this container image are available on
https://github.com/sclorg/varnish-container.
In that repository you also can find another versions of Python environment Dockerfiles.
Dockerfile for CentOS is called Dockerfile
, Dockerfile for RHEL7 is called Dockerfile.rhel7
,
for RHEL8 it's Dockerfile.rhel8
and the Fedora Dockerfile is called Dockerfile.fedora.
docker pull centos/varnish-6-centos7