Chapter 8. Daemon Images

8.1. Apache HTTP Server

8.1.1. Description

The rhscl/httpd-24-rhel7 image provides an Apache HTTP 2.4 Server. The image can be used as a base image for other applications based on Apache HTTP web server.

8.1.2. Access

To pull the rhscl/httpd-24-rhel7 image, run the following command as root:

# docker pull registry.access.redhat.com/rhscl/httpd-24-rhel7

The rhscl/httpd-24-rhel7 image supports using the S2I tool.

8.1.3. Configuration

The Apache HTTP Server container image supports the following configuration variable, which can be set by using the -e option with the docker run command:

Variable NameDescription

HTTPD_LOG_TO_VOLUME

By default, httpd logs into standard output, so the logs are accessible by using the docker logs command. When HTTPD_LOG_TO_VOLUME is set, httpd logs into /var/log/httpd24, which can be mounted to host system using the Docker volumes.

Note

The rhscl/httpd-24-rhel7 container image now uses 1001 as the default UID to work correctly within the source-to-image strategy in OpenShift. Additionally, the container image listens on port 8080 by default. Previously, the rhscl/httpd-24-rhel7 container image listened on port 80 by default and ran as UID 0.

To run the rhscl/httpd-24-rhel7 container image as UID 0, specify the -u 0 option of the docker run command:

docker run -u 0 rhscl/httpd-24-rhel7

8.2. nginx

8.2.1. Description

The rhscl/nginx-110-rhel7 image provides an nginx 1.10 server and a reverse proxy server; the image can be used as a base image for other applications based on nginx 1.10 web server.

The rhscl/nginx-18-rhel7 image provides an nginx 1.8 server and a reverse proxy server; the image can be used as a base image for other applications based on nginx 1.8 web server.

The rhscl/nginx-16-rhel7 image is no longer supported.

8.2.2. Access

To pull the rhscl/nginx-110-rhel7 image, run the following command as root:

# docker pull registry.access.redhat.com/rhscl/nginx-110-rhel7

To pull the rhscl/nginx-18-rhel7 image, run the following command as root:

# docker pull registry.access.redhat.com/rhscl/nginx-18-rhel7

8.2.3. Configuration

The nginx container images support the following configuration variable, which can be set by using the -e option with the docker run command:

Variable NameDescription

NGINX_LOG_TO_VOLUME

By default, nginx logs into standard output, so the logs are accessible by using the docker logs command. When NGINX_LOG_TO_VOLUME is set, nginx logs into /var/log/nginx110 or /var/log/nginx18 (depending on the version used), which can be mounted to host system using the Docker volumes.

The rhscl/nginx-110-rhel7 and rhscl/nginx-18-rhel7 images support using the S2I tool.

8.3. Varnish Cache

8.3.1. Description

The rhscl/varnish-4-rhel7 image provides Varnish Cache 4.0, an HTTP reverse proxy.

8.3.2. Access

To pull the rhscl/varnish-4-rhel7 image, run the following command as root:

# docker pull registry.access.redhat.com/rhscl/varnish-4-rhel7

8.3.3. Configuration

No further configuration is required.

The rhscl/varnish-4-rhel7 image supports using the S2I tool. Note that the default.vcl configuration file in the directory accessed by S2I needs to be in the VCL format.