Skip to content

Commit

Permalink
reenable httpd-2.4-c9s rebuilds (#203)
Browse files Browse the repository at this point in the history
* reenable httpd-2.4-c9s rebuilds
* 2.4, c9s: add version check, update paths to match reality

---------

Co-authored-by: Petr "Stone" Hracek <phracek@redhat.com>
  • Loading branch information
zmiklank and phracek committed Mar 27, 2024
1 parent 08a30eb commit 6c53955
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,28 @@ jobs:
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
image_name: "httpd-24"

- dockerfile: "2.4-micro/Dockerfile.c9s"
registry_namespace: "sclorg"
tag: "c9s"
image_name: "httpd-24-micro-c9s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"

- dockerfile: "2.4/Dockerfile.c9s"
registry_namespace: "sclorg"
tag: "c9s"
image_name: "httpd-24-c9s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"

- dockerfile: "2.4-micro/Dockerfile.c8s"
registry_namespace: "sclorg"
tag: "c8s"
image_name: "httpd-24-micro-c8s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"

- dockerfile: "2.4-micro/Dockerfile.fedora"
registry_namespace: "fedora"
tag: "2.4"
Expand Down
67 changes: 67 additions & 0 deletions 2.4/Dockerfile.c9s
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
FROM quay.io/sclorg/s2i-core-c9s:c9s

# Apache HTTP Server image.
#
# Volumes:
# * /var/www - Datastore for httpd
# * /var/log/httpd24 - Storage for logs when $HTTPD_LOG_TO_VOLUME is set
# Environment:
# * $HTTPD_LOG_TO_VOLUME (optional) - When set, httpd will log into /var/log/httpd24

ENV HTTPD_VERSION=2.4

ENV SUMMARY="Platform for running Apache httpd $HTTPD_VERSION or building httpd-based application" \
DESCRIPTION="Apache httpd $HTTPD_VERSION available as container, is a powerful, efficient, \
and extensible web server. Apache supports a variety of features, many implemented as compiled modules \
which extend the core functionality. \
These can range from server-side programming language support to authentication schemes. \
Virtual hosting allows one Apache installation to serve many different Web sites."

LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Apache httpd $HTTPD_VERSION" \
io.openshift.expose-services="8080:http,8443:https" \
io.openshift.tags="builder,httpd,httpd-24" \
name="sclorg/httpd-24-c9s" \
version="1" \
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#rhel" \
com.redhat.component="httpd-24-container" \
usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ quay.io/sclorg/httpd-24-c9s sample-server" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"

EXPOSE 8080
EXPOSE 8443

RUN INSTALL_PKGS="gettext hostname nss_wrapper bind-utils httpd mod_ssl mod_ldap mod_session mod_security mod_auth_mellon sscg" && \
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
httpd -v | grep -qe "Apache/$HTTPD_VERSION" && echo "Found VERSION $HTTPD_VERSION" && \
yum -y clean all --enablerepo='*'

ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \
HTTPD_APP_ROOT=${APP_ROOT} \
HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/httpd.d \
HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
HTTPD_MAIN_CONF_MODULES_D_PATH=/etc/httpd/conf.modules.d \
HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
HTTPD_TLS_CERT_PATH=/etc/httpd/tls \
HTTPD_VAR_RUN=/var/run/httpd \
HTTPD_DATA_PATH=/var/www \
HTTPD_DATA_ORIG_PATH=/var/www \
HTTPD_LOG_PATH=/var/log/httpd

COPY 2.4/s2i/bin/ $STI_SCRIPTS_PATH
COPY 2.4/root /

# Reset permissions of filesystem to default values
RUN /usr/libexec/httpd-prepare && rpm-file-permissions

USER 1001

# Not using VOLUME statement since it's not working in OpenShift Online:
# https://github.com/sclorg/httpd-container/issues/30
# VOLUME ["${HTTPD_DATA_PATH}"]
# VOLUME ["${HTTPD_LOG_PATH}"]

CMD ["/usr/bin/run-httpd"]

0 comments on commit 6c53955

Please sign in to comment.