Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions 2.4-micro/root/opt/app-root/scl_enable

This file was deleted.

16 changes: 0 additions & 16 deletions 2.4-micro/root/usr/libexec/httpd-prepare
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ set -e

source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh

# compatibility symlinks so we hide SCL paths
if [ -v HTTPD_SCL ] ; then
# /opt/rh/httpd24/root/etc/httpd will be symlink to /etc/httpd
mv /opt/rh/httpd24/root/etc/httpd /etc/httpd
ln -s /etc/httpd /opt/rh/httpd24/root/etc/httpd

# /opt/rh/httpd24/root/var/run/httpd will be symlink to /var/run/httpd
mv /opt/rh/httpd24/root/var/run/httpd /var/run/httpd
ln -s /var/run/httpd /opt/rh/httpd24/root/var/run/httpd

# /opt/rh/httpd24/root/var/www will be symlink to /var/www
rm -rf /var/www
mv /opt/rh/httpd24/root/var/www /var/www
ln -s /var/www /opt/rh/httpd24/root/var/www
fi

mkdir -p ${HTTPD_CONFIGURATION_PATH}
chmod -R a+rwx ${HTTPD_MAIN_CONF_PATH}
chmod -R a+rwx ${HTTPD_MAIN_CONF_D_PATH}
Expand Down
18 changes: 9 additions & 9 deletions 2.4-micro/root/usr/share/container-scripts/httpd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you need to install packages inside the image, please use the full sized imag

Usage in OpenShift
------------------
In this example, we assume that you are using the `rhel8/httpd-24-micro` image, available through the `httpd:24-micro` imagestream tag in Openshift.
In this example, we assume that you are using the `quay.io/sclorg/httpd-24-micro-c9s` image, available through the `httpd:2.4-micro-el9` imagestream tag in Openshift.
To build a simple [httpd-sample-app](https://github.com/sclorg/httpd-ex.git) application in Openshift:

```
Expand Down Expand Up @@ -76,7 +76,7 @@ To use the httpd image in a Dockerfile, follow these steps:
#### 1. Pull a base builder image to build on

```
podman pull rhel8/httpd-24-micro
podman pull quay.io/sclorg/httpd-24-micro-c9s
```

#### 2. Pull an application code
Expand All @@ -99,7 +99,7 @@ For all these three parts, you can either set up all manually and use the `httpd

##### 3.1. To use your own setup, create a Dockerfile with this content:
```
FROM registry.redhat.io/rhel8/httpd-24-micro
FROM quay.io/sclorg/httpd-24-micro-c9s

# Add application sources
ADD app-src/index.html /var/www/html/index.html
Expand All @@ -110,7 +110,7 @@ CMD run-httpd

##### 3.2. To use the Source-to-Image scripts and build an image using a Dockerfile, create a Dockerfile with this content:
```
FROM registry.redhat.io/rhel8/httpd-24-micro
FROM quay.io/sclorg/httpd-24-micro-c9s

# Add application sources to a directory where the assemble script expects them
# and set permissions so that the container runs without the root access
Expand Down Expand Up @@ -155,7 +155,7 @@ If you want to run the image directly and mount the static pages available in th
as a container volume, execute the following command:

```
$ podman run -d --name httpd -p 8080:8080 -v /wwwdata:/var/www:Z rhel8/httpd-24-micro
$ podman run -d --name httpd -p 8080:8080 -v /wwwdata:/var/www:Z quay.io/sclorg/httpd-24-micro-c9s
```

This creates a container named `httpd` running the Apache HTTP Server, serving data from
Expand All @@ -179,13 +179,13 @@ 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 rhel8/httpd-24-micro
$ podman run -d -u 0 -e HTTPD_LOG_TO_VOLUME=1 --name httpd -v /wwwlogs:/var/log/httpd24:Z quay.io/sclorg/httpd-24-micro-c9s
```

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 rhel8/httpd-24-micro
$ podman run -d -e HTTPD_MPM=event --name httpd quay.io/sclorg/httpd-24-micro-c9s
```

You can also set the following mount points by passing the `-v /host:/container` flag to podman.
Expand Down Expand Up @@ -228,7 +228,7 @@ By default, Apache HTTP Server container runs as UID 1001. That means the volume
To run the container as a different UID, use `-u` option. For example if you want to run the container as UID 1234, execute the following command:

```
podman run -d -u 1234 rhel8/httpd-24-micro
podman run -d -u 1234 quay.io/sclorg/httpd-24-micro-c9s
```

To log into a volume mounted directory, the container needs to be run as UID 0 (see above).
Expand All @@ -245,6 +245,6 @@ See also
--------
Dockerfile and other sources for this container image are available on
https://github.com/sclorg/httpd-container.
In that repository, the Dockerfile for RHEL8 is called Dockerfile.rhel8,
In that repository, the Dockerfile for CentOS Stream 9 is called Dockerfile.c9s,
the Dockerfile for CentOS Stream 10 is called Dockerfile.c10s,
and the Dockerfile for Fedora is called Dockerfile.fedora.
11 changes: 8 additions & 3 deletions 2.4-micro/s2i/bin/usage
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
#!/bin/sh

DISTRO=`cat /etc/*-release | grep ^ID= | grep -Po '".*?"' | tr -d '"'`
NAMESPACE=centos
[[ $DISTRO =~ rhel* ]] && NAMESPACE=rhscl
NAMESPACE=sclorg
if [[ $DISTRO =~ rhel* ]]; then
NAMESPACE=rhel10
DISTRO=""
else
DISTRO="-c10s"
fi

cat <<EOF
This is a S2I ${IMAGE_DESCRIPTION} ${DISTRO} base image:
To use it, install S2I: https://github.com/openshift/source-to-image

Sample invocation:

s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ ${NAMESPACE}/httpd-24-${DISTRO}7 httpd-sample-app
s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ ${NAMESPACE}/httpd-24${DISTRO} httpd-sample-app

You can then run the resulting image via:
podman run -p 8080:8080 httpd-sample-app
Expand Down
Empty file removed 2.4/.exclude-centos7
Empty file.
76 changes: 0 additions & 76 deletions 2.4/Dockerfile

This file was deleted.

77 changes: 0 additions & 77 deletions 2.4/Dockerfile.rhel7

This file was deleted.

3 changes: 0 additions & 3 deletions 2.4/root/opt/app-root/scl_enable

This file was deleted.

16 changes: 0 additions & 16 deletions 2.4/root/usr/libexec/httpd-prepare
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ set -e

source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh

# compatibility symlinks so we hide SCL paths
if [ -v HTTPD_SCL ] ; then
# /opt/rh/httpd24/root/etc/httpd will be symlink to /etc/httpd
mv /opt/rh/httpd24/root/etc/httpd /etc/httpd
ln -s /etc/httpd /opt/rh/httpd24/root/etc/httpd

# /opt/rh/httpd24/root/var/run/httpd will be symlink to /var/run/httpd
mv /opt/rh/httpd24/root/var/run/httpd /var/run/httpd
ln -s /var/run/httpd /opt/rh/httpd24/root/var/run/httpd

# /opt/rh/httpd24/root/var/www will be symlink to /var/www
rm -rf /var/www
mv /opt/rh/httpd24/root/var/www /var/www
ln -s /var/www /opt/rh/httpd24/root/var/www
fi

mkdir -p ${HTTPD_CONFIGURATION_PATH}
chmod -R a+rwx ${HTTPD_MAIN_CONF_PATH}
chmod -R a+rwx ${HTTPD_MAIN_CONF_D_PATH}
Expand Down
18 changes: 9 additions & 9 deletions 2.4/root/usr/share/container-scripts/httpd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ Virtual hosting allows one Apache installation to serve many different Web sites

Usage in OpenShift
------------------
In this example, we assume that you are using the `rhel8/httpd-24` image, available through the `openshift/httpd:2.4-el8` imagestream tag in Openshift.
In this example, we assume that you are using the `rhel10/httpd-24` image, available through the `openshift/httpd:2.4-el10` imagestream tag in Openshift.
To build a simple [httpd-sample-app](https://github.com/sclorg/httpd-ex.git) application in Openshift:

```
oc new-app openshift/httpd:2.4-el8~https://github.com/sclorg/httpd-ex.git
oc new-app openshift/httpd:2.4-el10~https://github.com/sclorg/httpd-ex.git
```

To access the application:
Expand Down Expand Up @@ -74,7 +74,7 @@ To use the httpd image in a Dockerfile, follow these steps:
#### 1. Pull a base builder image to build on

```
podman pull rhel8/httpd-24
podman pull rhel10/httpd-24
```

#### 2. Pull an application code
Expand All @@ -97,7 +97,7 @@ For all these three parts, you can either set up all manually and use the `httpd

##### 3.1. To use your own setup, create a Dockerfile with this content:
```
FROM registry.redhat.io/rhel8/httpd-24
FROM registry.redhat.io/rhel10/httpd-24

# Add application sources
ADD app-src/index.html /var/www/html/index.html
Expand All @@ -108,7 +108,7 @@ CMD run-httpd

##### 3.2. To use the Source-to-Image scripts and build an image using a Dockerfile, create a Dockerfile with this content:
```
FROM registry.redhat.io/rhel8/httpd-24
FROM registry.redhat.io/rhel10/httpd-24

# Add application sources to a directory where the assemble script expects them
# and set permissions so that the container runs without the root access
Expand Down Expand Up @@ -153,7 +153,7 @@ If you want to run the image directly and mount the static pages available in th
as a container volume, execute the following command:

```
$ podman run -d --name httpd -p 8080:8080 -v /wwwdata:/var/www:Z rhel8/httpd-24
$ podman run -d --name httpd -p 8080:8080 -v /wwwdata:/var/www:Z rhel10/httpd-24
```

This creates a container named `httpd` running the Apache HTTP Server, serving data from
Expand All @@ -177,13 +177,13 @@ 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 rhel8/httpd-24
$ podman run -d -u 0 -e HTTPD_LOG_TO_VOLUME=1 --name httpd -v /wwwlogs:/var/log/httpd24:Z rhel10/httpd-24
```

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 rhel8/httpd-24
$ podman run -d -e HTTPD_MPM=event --name httpd rhel10/httpd-24
```

You can also set the following mount points by passing the `-v /host:/container` flag to podman.
Expand Down Expand Up @@ -226,7 +226,7 @@ By default, Apache HTTP Server container runs as UID 1001. That means the volume
To run the container as a different UID, use `-u` option. For example if you want to run the container as UID 1234, execute the following command:

```
podman run -d -u 1234 rhel8/httpd-24
podman run -d -u 1234 rhel10/httpd-24
```

To log into a volume mounted directory, the container needs to be run as UID 0 (see above).
Expand Down
Loading