From 6c539555703e90e5792436094a341503df88d2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zuzana=20Mikl=C3=A1nkov=C3=A1?= Date: Wed, 27 Mar 2024 10:19:33 +0100 Subject: [PATCH] reenable httpd-2.4-c9s rebuilds (#203) * reenable httpd-2.4-c9s rebuilds * 2.4, c9s: add version check, update paths to match reality --------- Co-authored-by: Petr "Stone" Hracek --- .github/workflows/build-and-push.yml | 10 +++++ 2.4/Dockerfile.c9s | 67 ++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 2.4/Dockerfile.c9s diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 8a06b9b0..bf7dbe20 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -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" diff --git a/2.4/Dockerfile.c9s b/2.4/Dockerfile.c9s new file mode 100644 index 00000000..e77a1f76 --- /dev/null +++ b/2.4/Dockerfile.c9s @@ -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 " + +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"]