The Red Hat Ecosystem Catalog is the official source for discovering and learning more about the Red Hat Ecosystem of both Red Hat and certified third-party products and services.
We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.
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 rhel8/varnish-6 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/ rhel8/varnish-6 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.
Use the following instructions to get images from a Red Hat container registry using registry service account tokens. You will need to create a registry service account to use prior to completing any of the following tasks.
First, you will need to add a reference to the appropriate secret and repository to your Kubernetes pod configuration via an imagePullSecrets field.
Then, use the following from the command line or from the OpenShift Dashboard GUI interface.
Use the following command(s) from a system with podman installed
Use the following command(s) from a system with docker service installed and running
Use the following instructions to get images from a Red Hat container registry using your Red Hat login.
For best practices, it is recommended to use registry tokens when pulling content for OpenShift deployments.
Use the following command(s) from a system with podman installed
Use the following command(s) from a system with docker service installed and running
Source code is available for all Red Hat UBI-based images in the form of downloadable containers. Here are a few things you should know about Red Hat source containers.
Use skopeo to copy the source image to a local directory
Inspect the image
Untar the contents
Begin examining and using the content.