此内容没有您所选择的语言版本。
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:
# podman pull registry.access.redhat.com/rhscl/httpd-24-rhel7
The rhscl/httpd-24-rhel7 image supports using the S2I tool.
8.1.3. Configuration and Usage
The Apache HTTP Server container image supports the following configuration variables, which can be set by using the -e
option with the podman run
command:
Variable Name | Description |
---|---|
|
By default, |
| This variable can be set to change the default Multi-Processing Module (MPM) from the package default MPM. |
If you want to run the image and mount the log files into /wwwlogs
on the host as a container volume, execute the following command:
$ podman run -d -u 0 -e HTTPD_LOG_TO_VOLUME=1 --name httpd -v /wwwlogs:/var/log/httpd24:Z rhscl/httpd-24-rhel7
To run an image using the event
MPM (rather than the default prefork
), execute the following command:
$ podman run -d -e HTTPD_MPM=event --name httpd rhscl/httpd-24-rhel7
You can also set the following mount points by passing the -v /host:/container
option to the podman run
command:
Volume Mount Point | Description |
---|---|
| Apache HTTP Server data directory |
| Apache HTTP Server log directory (available only when running as root) |
When mouting a directory from the host into the container, ensure that the mounted directory has the appropriate permissions and that the owner and group of the directory matches the user UID or name which is running inside the container.
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 podman run
command:
podman 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 Name | Description |
---|---|
|
By default, nginx logs into standard output, so the logs are accessible by using the |
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.