From 5570e915974a6bb3bb71b343c5343fe34a0909bd Mon Sep 17 00:00:00 2001 From: Nikola Davidova Date: Mon, 25 May 2026 13:56:40 +0200 Subject: [PATCH] add distgen support --- 2.4-micro/.build-args-c9s | 1 - 2.4-micro/.exclude-c8s | 0 2.4-micro/{2.4-micro => 2.4} | 0 2.4-micro/Dockerfile.c10s | 82 ------- 2.4-micro/Dockerfile.c8s | 81 ------- 2.4-micro/Dockerfile.c9s | 82 ------- 2.4-micro/Dockerfile.fedora | 82 ------- 2.4-micro/core-scripts | 1 - 2.4-micro/root | 1 + .../share/container-scripts/httpd/common.sh | 216 ------------------ 2.4-micro/s2i | 1 + 2.4-micro/test | 1 + 2.4-micro/test/__init__.py | 1 - 2.4-micro/test/check_imagestreams.py | 1 - 2.4-micro/test/conftest.py | 1 - 2.4-micro/test/examples | 1 - 2.4-micro/test/imagestreams | 1 - 2.4-micro/test/run | 1 - 2.4-micro/test/run-openshift-pytest | 1 - 2.4-micro/test/run-openshift-remote-cluster | 1 - 2.4-micro/test/run-pytest | 1 - 2.4-micro/test/sample-test-app | 1 - 2.4-micro/test/self-signed-ssl | 1 - 2.4-micro/test/settings.py | 1 - 2.4-micro/test/test-lib-httpd.sh | 1 - 2.4-micro/test/test-lib-openshift.sh | 1 - 2.4-micro/test/test-lib-remote-openshift.sh | 1 - 2.4-micro/test/test-lib.sh | 1 - 2.4-micro/test/test_container_httpd.py | 1 - 2.4-micro/test/test_container_httpd_s2i.py | 1 - 2.4-micro/test/test_ocp_ex_template.py | 1 - 2.4-micro/test/test_ocp_imagestream_s2i.py | 1 - 2.4-micro/test/test_ocp_imagestreams.py | 1 - 2.4-micro/test/test_ocp_integration.py | 1 - .../test/test_ocp_shared_helm_imagestreams.py | 1 - .../test/test_ocp_shared_helm_template.py | 1 - 2.4/root | 1 + 2.4/root/usr/bin/run-httpd | 18 -- 2.4/root/usr/libexec/httpd-prepare | 28 --- .../container-scripts/httpd/passwd.template | 14 -- .../httpd/post-assemble/20-copy-config.sh | 4 - .../httpd/post-assemble/40-ssl-certs.sh | 4 - .../httpd/pre-init/10-set-mpm.sh | 3 - .../httpd/pre-init/20-copy-config.sh | 4 - .../httpd/pre-init/40-ssl-certs.sh | 4 - 2.4/s2i | 1 + 2.4/s2i/bin/assemble | 21 -- 2.4/s2i/bin/run | 7 - 2.4/s2i/bin/usage | 22 -- 2.4/test | 1 + 2.4/test/__init__.py | 1 - 2.4/test/check_imagestreams.py | 1 - 2.4/test/conftest.py | 1 - 2.4/test/examples | 1 - 2.4/test/imagestreams | 1 - .../httpd-pre-init/modify_index.sh | 1 - 2.4/test/pre-init-test-app/index.html | 1 - 2.4/test/run | 1 - 2.4/test/run-openshift-pytest | 1 - 2.4/test/run-openshift-remote-cluster | 1 - 2.4/test/run-pytest | 1 - 2.4/test/sample-test-app | 1 - 2.4/test/self-signed-ssl | 1 - 2.4/test/settings.py | 1 - 2.4/test/test-lib-httpd.sh | 1 - 2.4/test/test-lib-openshift.sh | 1 - 2.4/test/test-lib-remote-openshift.sh | 1 - 2.4/test/test-lib.sh | 1 - 2.4/test/test-openshift.yaml | 1 - 2.4/test/test_container_httpd.py | 1 - 2.4/test/test_container_httpd_s2i.py | 1 - 2.4/test/test_ocp_ex_template.py | 1 - 2.4/test/test_ocp_imagestream_s2i.py | 1 - 2.4/test/test_ocp_imagestreams.py | 1 - 2.4/test/test_ocp_integration.py | 1 - 2.4/test/test_ocp_shared_helm_imagestreams.py | 1 - 2.4/test/test_ocp_shared_helm_template.py | 1 - 2.4/test/utils.sh | 46 ---- README.md | 2 +- manifest.yml | 43 ++++ specs/multispec.yml | 133 +++++++++++ src/Dockerfile | 158 +++++++++++++ src/README.md | 1 + .../httpd => src/root}/README.md | 0 {2.4-micro => src}/root/usr/bin/run-httpd | 0 .../root/usr/libexec/httpd-prepare | 0 .../share/container-scripts/httpd/README.md | 33 +-- .../share/container-scripts/httpd/common.sh | 0 .../container-scripts/httpd/passwd.template | 0 .../httpd/post-assemble/20-copy-config.sh | 0 .../httpd/post-assemble/40-ssl-certs.sh | 0 .../httpd/pre-init/10-set-mpm.sh | 0 .../httpd/pre-init/20-copy-config.sh | 0 .../httpd/pre-init/40-ssl-certs.sh | 0 {2.4-micro => src}/s2i/bin/assemble | 0 {2.4-micro => src}/s2i/bin/run | 0 {2.4-micro => src}/s2i/bin/usage | 0 test/examples | 1 + .../httpd-pre-init/modify_index.sh | 0 .../pre-init-test-app/index.html | 0 test/run-openshift-remote-cluster | 1 + test/self-signed-ssl | 1 + test/test-lib-httpd.sh | 1 + test/test-lib-openshift.sh | 1 + test/test-lib-remote-openshift.sh | 1 + test/test-openshift.yaml | 1 + {2.4-micro/test => test}/utils.sh | 0 107 files changed, 366 insertions(+), 788 deletions(-) delete mode 100644 2.4-micro/.build-args-c9s delete mode 100644 2.4-micro/.exclude-c8s rename 2.4-micro/{2.4-micro => 2.4} (100%) delete mode 100644 2.4-micro/Dockerfile.c10s delete mode 100644 2.4-micro/Dockerfile.c8s delete mode 100644 2.4-micro/Dockerfile.c9s delete mode 100644 2.4-micro/Dockerfile.fedora delete mode 120000 2.4-micro/core-scripts create mode 120000 2.4-micro/root delete mode 100644 2.4-micro/root/usr/share/container-scripts/httpd/common.sh create mode 120000 2.4-micro/s2i create mode 120000 2.4-micro/test delete mode 120000 2.4-micro/test/__init__.py delete mode 120000 2.4-micro/test/check_imagestreams.py delete mode 120000 2.4-micro/test/conftest.py delete mode 120000 2.4-micro/test/examples delete mode 120000 2.4-micro/test/imagestreams delete mode 120000 2.4-micro/test/run delete mode 120000 2.4-micro/test/run-openshift-pytest delete mode 120000 2.4-micro/test/run-openshift-remote-cluster delete mode 120000 2.4-micro/test/run-pytest delete mode 120000 2.4-micro/test/sample-test-app delete mode 120000 2.4-micro/test/self-signed-ssl delete mode 120000 2.4-micro/test/settings.py delete mode 120000 2.4-micro/test/test-lib-httpd.sh delete mode 120000 2.4-micro/test/test-lib-openshift.sh delete mode 120000 2.4-micro/test/test-lib-remote-openshift.sh delete mode 120000 2.4-micro/test/test-lib.sh delete mode 120000 2.4-micro/test/test_container_httpd.py delete mode 120000 2.4-micro/test/test_container_httpd_s2i.py delete mode 120000 2.4-micro/test/test_ocp_ex_template.py delete mode 120000 2.4-micro/test/test_ocp_imagestream_s2i.py delete mode 120000 2.4-micro/test/test_ocp_imagestreams.py delete mode 120000 2.4-micro/test/test_ocp_integration.py delete mode 120000 2.4-micro/test/test_ocp_shared_helm_imagestreams.py delete mode 120000 2.4-micro/test/test_ocp_shared_helm_template.py create mode 120000 2.4/root delete mode 100755 2.4/root/usr/bin/run-httpd delete mode 100755 2.4/root/usr/libexec/httpd-prepare delete mode 100644 2.4/root/usr/share/container-scripts/httpd/passwd.template delete mode 100644 2.4/root/usr/share/container-scripts/httpd/post-assemble/20-copy-config.sh delete mode 100644 2.4/root/usr/share/container-scripts/httpd/post-assemble/40-ssl-certs.sh delete mode 100644 2.4/root/usr/share/container-scripts/httpd/pre-init/10-set-mpm.sh delete mode 100644 2.4/root/usr/share/container-scripts/httpd/pre-init/20-copy-config.sh delete mode 100644 2.4/root/usr/share/container-scripts/httpd/pre-init/40-ssl-certs.sh create mode 120000 2.4/s2i delete mode 100755 2.4/s2i/bin/assemble delete mode 100755 2.4/s2i/bin/run delete mode 100755 2.4/s2i/bin/usage create mode 120000 2.4/test delete mode 120000 2.4/test/__init__.py delete mode 120000 2.4/test/check_imagestreams.py delete mode 120000 2.4/test/conftest.py delete mode 120000 2.4/test/examples delete mode 120000 2.4/test/imagestreams delete mode 100644 2.4/test/pre-init-test-app/httpd-pre-init/modify_index.sh delete mode 100644 2.4/test/pre-init-test-app/index.html delete mode 120000 2.4/test/run delete mode 120000 2.4/test/run-openshift-pytest delete mode 120000 2.4/test/run-openshift-remote-cluster delete mode 120000 2.4/test/run-pytest delete mode 120000 2.4/test/sample-test-app delete mode 120000 2.4/test/self-signed-ssl delete mode 120000 2.4/test/settings.py delete mode 120000 2.4/test/test-lib-httpd.sh delete mode 120000 2.4/test/test-lib-openshift.sh delete mode 120000 2.4/test/test-lib-remote-openshift.sh delete mode 120000 2.4/test/test-lib.sh delete mode 120000 2.4/test/test-openshift.yaml delete mode 120000 2.4/test/test_container_httpd.py delete mode 120000 2.4/test/test_container_httpd_s2i.py delete mode 120000 2.4/test/test_ocp_ex_template.py delete mode 120000 2.4/test/test_ocp_imagestream_s2i.py delete mode 120000 2.4/test/test_ocp_imagestreams.py delete mode 120000 2.4/test/test_ocp_integration.py delete mode 120000 2.4/test/test_ocp_shared_helm_imagestreams.py delete mode 120000 2.4/test/test_ocp_shared_helm_template.py delete mode 100755 2.4/test/utils.sh create mode 100644 manifest.yml create mode 100644 specs/multispec.yml create mode 100644 src/Dockerfile create mode 120000 src/README.md rename {2.4/root/usr/share/container-scripts/httpd => src/root}/README.md (100%) rename {2.4-micro => src}/root/usr/bin/run-httpd (100%) rename {2.4-micro => src}/root/usr/libexec/httpd-prepare (100%) rename {2.4-micro => src}/root/usr/share/container-scripts/httpd/README.md (89%) rename {2.4 => src}/root/usr/share/container-scripts/httpd/common.sh (100%) rename {2.4-micro => src}/root/usr/share/container-scripts/httpd/passwd.template (100%) rename {2.4-micro => src}/root/usr/share/container-scripts/httpd/post-assemble/20-copy-config.sh (100%) rename {2.4-micro => src}/root/usr/share/container-scripts/httpd/post-assemble/40-ssl-certs.sh (100%) rename {2.4-micro => src}/root/usr/share/container-scripts/httpd/pre-init/10-set-mpm.sh (100%) rename {2.4-micro => src}/root/usr/share/container-scripts/httpd/pre-init/20-copy-config.sh (100%) rename {2.4-micro => src}/root/usr/share/container-scripts/httpd/pre-init/40-ssl-certs.sh (100%) rename {2.4-micro => src}/s2i/bin/assemble (100%) rename {2.4-micro => src}/s2i/bin/run (100%) rename {2.4-micro => src}/s2i/bin/usage (100%) create mode 120000 test/examples rename {2.4-micro/test => test}/pre-init-test-app/httpd-pre-init/modify_index.sh (100%) mode change 100644 => 100755 rename {2.4-micro/test => test}/pre-init-test-app/index.html (100%) create mode 100755 test/run-openshift-remote-cluster create mode 120000 test/self-signed-ssl create mode 100755 test/test-lib-httpd.sh create mode 100755 test/test-lib-openshift.sh create mode 100755 test/test-lib-remote-openshift.sh create mode 100644 test/test-openshift.yaml rename {2.4-micro/test => test}/utils.sh (100%) mode change 100755 => 100644 diff --git a/2.4-micro/.build-args-c9s b/2.4-micro/.build-args-c9s deleted file mode 100644 index 3f9af48b..00000000 --- a/2.4-micro/.build-args-c9s +++ /dev/null @@ -1 +0,0 @@ ---cap-add=CAP_SYS_CHROOT diff --git a/2.4-micro/.exclude-c8s b/2.4-micro/.exclude-c8s deleted file mode 100644 index e69de29b..00000000 diff --git a/2.4-micro/2.4-micro b/2.4-micro/2.4 similarity index 100% rename from 2.4-micro/2.4-micro rename to 2.4-micro/2.4 diff --git a/2.4-micro/Dockerfile.c10s b/2.4-micro/Dockerfile.c10s deleted file mode 100644 index aecd17e1..00000000 --- a/2.4-micro/Dockerfile.c10s +++ /dev/null @@ -1,82 +0,0 @@ -FROM quay.io/centos/centos:stream10-development AS build - -RUN mkdir -p /mnt/rootfs -RUN MICRO_PKGS="coreutils-single glibc-minimal-langpack" && \ - INSTALL_PKGS="${MICRO_PKGS} httpd-core mod_ssl findutils hostname nss_wrapper-libs redhat-logos-httpd" && \ - dnf install --installroot /mnt/rootfs ${INSTALL_PKGS} --releasever 9 --setopt install_weak_deps=false --nodocs -y && \ - dnf -y --installroot /mnt/rootfs clean all && \ - rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.* - -FROM scratch -# 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 \ - HTTPD_SHORT_VERSION=24 \ - NAME=httpd - -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." \ -# The following variables are usually available from parent s2i images \ - STI_SCRIPTS_PATH=/usr/libexec/s2i \ - APP_ROOT=/opt/app-root \ - HOME=/opt/app-root/src \ - PLATFORM="el10" - -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,${NAME},${NAME}-${HTTPD_SHORT_VERSION}" \ - name="sclorg/${NAME}-${HTTPD_SHORT_VERSION}-micro-c10s" \ - version="1" \ - usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ sclorg/${NAME}-${HTTPD_SHORT_VERSION}-micro-c10s sample-server" \ - maintainer="SoftwareCollections.org " - -EXPOSE 8080 -EXPOSE 8443 - -COPY --from=build /mnt/rootfs/ / - -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 ${HTTPD_VERSION}-micro/s2i/bin/ ${STI_SCRIPTS_PATH} -COPY ${HTTPD_VERSION}-micro/root / -COPY ${HTTPD_VERSION}-micro/core-scripts/usr /usr - -WORKDIR ${HOME} - -# Add default user and prepare httpd -RUN useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ - chown -R 1001:0 ${APP_ROOT} && \ - httpd -v | grep -qe "Apache/${HTTPD_VERSION}" && echo "Found VERSION ${HTTPD_VERSION}" && \ - /usr/libexec/httpd-prepare - -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"] diff --git a/2.4-micro/Dockerfile.c8s b/2.4-micro/Dockerfile.c8s deleted file mode 100644 index 40f0d05c..00000000 --- a/2.4-micro/Dockerfile.c8s +++ /dev/null @@ -1,81 +0,0 @@ -FROM quay.io/centos/centos:stream8 AS build - -RUN mkdir -p /mnt/rootfs -RUN dnf -y module enable httpd:2.4 && \ - MICRO_PKGS="coreutils-single glibc-minimal-langpack" && \ - INSTALL_PKGS="$MICRO_PKGS httpd mod_ssl findutils hostname nss_wrapper redhat-logos-httpd" && \ - dnf install --installroot /mnt/rootfs $INSTALL_PKGS --releasever 8 --setopt install_weak_deps=false --nodocs -y && \ - dnf -y --installroot /mnt/rootfs clean all && \ - rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.* - -FROM scratch -# 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." \ -# The following variables are usually available from parent s2i images \ - STI_SCRIPTS_PATH=/usr/libexec/s2i \ - APP_ROOT=/opt/app-root \ - HOME=/opt/app-root/src \ - PLATFORM="el8" - -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-micro-c8s" \ - version="1" \ - usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ sclorg/httpd-24-micro-c8s sample-server" \ - maintainer="SoftwareCollections.org " - -EXPOSE 8080 -EXPOSE 8443 - -COPY --from=build /mnt/rootfs/ / - -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-micro/s2i/bin/ $STI_SCRIPTS_PATH -COPY 2.4-micro/root / -COPY 2.4-micro/core-scripts/usr /usr - -WORKDIR ${HOME} - -# Add default user and prepare httpd -RUN useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ - chown -R 1001:0 ${APP_ROOT} && \ - httpd -v | grep -qe "Apache/$HTTPD_VERSION" && echo "Found VERSION $HTTPD_VERSION" && \ - /usr/libexec/httpd-prepare - -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"] diff --git a/2.4-micro/Dockerfile.c9s b/2.4-micro/Dockerfile.c9s deleted file mode 100644 index 5362b00c..00000000 --- a/2.4-micro/Dockerfile.c9s +++ /dev/null @@ -1,82 +0,0 @@ -FROM quay.io/centos/centos:stream9 AS build - -RUN mkdir -p /mnt/rootfs -RUN MICRO_PKGS="coreutils-single glibc-minimal-langpack" && \ - INSTALL_PKGS="${MICRO_PKGS} httpd-core mod_ssl findutils hostname nss_wrapper-libs redhat-logos-httpd" && \ - dnf install --installroot /mnt/rootfs ${INSTALL_PKGS} --releasever 9 --setopt install_weak_deps=false --nodocs -y && \ - dnf -y --installroot /mnt/rootfs clean all && \ - rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.* - -FROM scratch -# 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 \ - HTTPD_SHORT_VERSION=24 \ - NAME=httpd - -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." \ -# The following variables are usually available from parent s2i images \ - STI_SCRIPTS_PATH=/usr/libexec/s2i \ - APP_ROOT=/opt/app-root \ - HOME=/opt/app-root/src \ - PLATFORM="el9" - -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,${NAME},${NAME}-${HTTPD_SHORT_VERSION}" \ - name="sclorg/${NAME}-${HTTPD_SHORT_VERSION}-micro-c9s" \ - version="1" \ - usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ sclorg/${NAME}-${HTTPD_SHORT_VERSION}-micro-c9s sample-server" \ - maintainer="SoftwareCollections.org " - -EXPOSE 8080 -EXPOSE 8443 - -COPY --from=build /mnt/rootfs/ / - -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 ${HTTPD_VERSION}-micro/s2i/bin/ ${STI_SCRIPTS_PATH} -COPY ${HTTPD_VERSION}-micro/root / -COPY ${HTTPD_VERSION}-micro/core-scripts/usr /usr - -WORKDIR ${HOME} - -# Add default user and prepare httpd -RUN useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ - chown -R 1001:0 ${APP_ROOT} && \ - httpd -v | grep -qe "Apache/${HTTPD_VERSION}" && echo "Found VERSION ${HTTPD_VERSION}" && \ - /usr/libexec/httpd-prepare - -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"] diff --git a/2.4-micro/Dockerfile.fedora b/2.4-micro/Dockerfile.fedora deleted file mode 100644 index fe3a37e8..00000000 --- a/2.4-micro/Dockerfile.fedora +++ /dev/null @@ -1,82 +0,0 @@ -FROM quay.io/fedora/fedora:42 AS build - -RUN mkdir -p /mnt/rootfs -RUN MICRO_PKGS="coreutils-single glibc-minimal-langpack" && \ - INSTALL_PKGS="${MICRO_PKGS} httpd-core mod_ssl findutils hostname nss_wrapper-libs fedora-logos-httpd" && \ - dnf install --installroot /mnt/rootfs ${INSTALL_PKGS} --releasever 42 --use-host-config --setopt install_weak_deps=false --nodocs -y && \ - dnf -y --installroot /mnt/rootfs clean all && \ - rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.* - -FROM scratch -# 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 \ - HTTPD_SHORT_VERSION=24 \ - NAME=httpd - -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." \ -# The following variables are usually available from parent s2i images \ - STI_SCRIPTS_PATH=/usr/libexec/s2i \ - APP_ROOT=/opt/app-root \ - HOME=/opt/app-root/src \ - PLATFORM="fedora" - -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,${NAME},${NAME}-${HTTPD_SHORT_VERSION}" \ - name="fedora/${NAME}-${HTTPD_SHORT_VERSION}-micro" \ - version="1" \ - usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ fedora/${NAME}-${HTTPD_SHORT_VERSION}-micro sample-server" \ - maintainer="SoftwareCollections.org " - -EXPOSE 8080 -EXPOSE 8443 - -COPY --from=build /mnt/rootfs/ / - -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 ${HTTPD_VERSION}-micro/s2i/bin/ ${STI_SCRIPTS_PATH} -COPY ${HTTPD_VERSION}-micro/root / -COPY ${HTTPD_VERSION}-micro/core-scripts/usr /usr - -WORKDIR ${HOME} - -# Add default user and prepare httpd -RUN useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ - chown -R 1001:0 ${APP_ROOT} && \ - httpd -v | grep -qe "Apache/${HTTPD_VERSION}" && echo "Found VERSION ${HTTPD_VERSION}" && \ - /usr/libexec/httpd-prepare - -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"] diff --git a/2.4-micro/core-scripts b/2.4-micro/core-scripts deleted file mode 120000 index c28fe81b..00000000 --- a/2.4-micro/core-scripts +++ /dev/null @@ -1 +0,0 @@ -../common/shared-scripts/core/ \ No newline at end of file diff --git a/2.4-micro/root b/2.4-micro/root new file mode 120000 index 00000000..bb2cc8d2 --- /dev/null +++ b/2.4-micro/root @@ -0,0 +1 @@ +../src/root \ No newline at end of file diff --git a/2.4-micro/root/usr/share/container-scripts/httpd/common.sh b/2.4-micro/root/usr/share/container-scripts/httpd/common.sh deleted file mode 100644 index c0908f28..00000000 --- a/2.4-micro/root/usr/share/container-scripts/httpd/common.sh +++ /dev/null @@ -1,216 +0,0 @@ -# Set of functions used in other scripts - -if [ "x$PLATFORM" == "xel8" ]; then - HTTPCONF_LINENO=154 -elif [ "x$PLATFORM" == "xel9" ]; then - HTTPCONF_LINENO=156 -else - HTTPCONF_LINENO=156 -fi - -gen_ssl_certs() { - local sslcert=$HTTPD_TLS_CERT_PATH/localhost.crt - local sslkey=$HTTPD_TLS_CERT_PATH/localhost.key - local fqdn=`hostname` - - # A >59 char FQDN means "root@FQDN" exceeds 64-char max length for emailAddress - if [ "x${fqdn}" = "x" -o ${#fqdn} -gt 59 ]; then - fqdn=localhost.localdomain - fi - - if [ -f ${sslcert} -o -f ${sslkey} ]; then - return 0 - fi - - echo "---> Generating SSL key pair for httpd..." - if [ -x "/usr/bin/sscg" ]; then - if sscg --help | grep -q dhparams-file; then - # This is not used by mod_ssl but sscg now generates it - # See https://bugzilla.redhat.com/show_bug.cgi?id=2143206 - dhparams=$HTTPD_TLS_CERT_PATH/dhparams.pem - fi - sscg -q \ - --cert-file $sslcert \ - --cert-key-file $sslkey \ - --ca-file $sslcert \ - --lifetime 365 \ - --hostname $fqdn \ - --email root@$fqdn \ - ${dhparams+--dhparams-file $dhparams} - else - openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 2048 > ${sslkey} 2> /dev/null - - cat << EOF | openssl req -new -key ${sslkey} \ - -x509 -sha256 -days 365 -set_serial $RANDOM -extensions v3_req \ - -out ${sslcert} 2>/dev/null --- -SomeState -SomeCity -SomeOrganization -SomeOrganizationalUnit -${fqdn} -root@${fqdn} -EOF - fi - - chmod 640 ${sslcert} - chmod 640 ${sslkey} -} - -config_general() { - sed -i -e 's/^Listen 80$/Listen 8080/' ${HTTPD_MAIN_CONF_PATH}/httpd.conf && \ - sed -i -e ${HTTPCONF_LINENO}'s%AllowOverride None%AllowOverride All%' ${HTTPD_MAIN_CONF_PATH}/httpd.conf && \ - sed -i -e 's/^Listen 443/Listen 8443/' ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf - sed -i -e 's/_default_:443/_default_:8443/' ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf - - # do sed for SSLCertificateFile and SSLCertificateKeyFile - sed -i -e "s|^SSLCertificateFile .*$|SSLCertificateFile ${HTTPD_TLS_CERT_PATH}/localhost.crt|" ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf - sed -i -e "s|^SSLCertificateKeyFile .*$|SSLCertificateKeyFile ${HTTPD_TLS_CERT_PATH}/localhost.key|" ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf -} - -config_log_to_stdout() { - sed -ri " s!^(\s*CustomLog)\s+\S+!\1 |/usr/bin/cat!g; s!^(\s*ErrorLog)\s+\S+!\1 |/usr/bin/cat!g;" ${HTTPD_MAIN_CONF_PATH}/httpd.conf - sed -ri " s!^(\s*CustomLog)\s+\S+!\1 |/usr/bin/cat!g; s!^(\s*TransferLog)\s+\S+!\1 |/usr/bin/cat!g; s!^(\s*ErrorLog)\s+\S+!\1 |/usr/bin/cat!g;" ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf -} - -runs_privileged() { - test "$(id -u)" == "0" - return $? -} - -config_privileged() { - # Change the s2i permissions back to the normal ones - chmod 644 ${HTTPD_MAIN_CONF_PATH}/* && \ - chmod 755 ${HTTPD_MAIN_CONF_PATH} && \ - chmod 644 ${HTTPD_MAIN_CONF_D_PATH}/* && \ - chmod 755 ${HTTPD_MAIN_CONF_D_PATH} && \ - chmod 644 ${HTTPD_MAIN_CONF_MODULES_D_PATH}/* && \ - chmod 755 ${HTTPD_MAIN_CONF_MODULES_D_PATH} && \ - chmod 600 ${HTTPD_TLS_CERT_PATH}/localhost.crt && \ - chmod 600 ${HTTPD_TLS_CERT_PATH}/localhost.key && \ - chmod 710 ${HTTPD_VAR_RUN} - - if ! [ -v HTTPD_LOG_TO_VOLUME ] ; then - config_log_to_stdout - fi -} - -config_s2i() { - sed -i -e "s%^DocumentRoot \"${HTTPD_DATA_ORIG_PATH}/html\"%DocumentRoot \"${HTTPD_APP_ROOT}/src\"%" ${HTTPD_MAIN_CONF_PATH}/httpd.conf - sed -i -e "s%^> ${HTTPD_MAIN_CONF_PATH}/httpd.conf && \ - head -n${HTTPCONF_LINENO} ${HTTPD_MAIN_CONF_PATH}/httpd.conf | tail -n1 | grep "AllowOverride All" || exit -} - -config_non_privileged() { - sed -i -e "s/^User apache/User default/" ${HTTPD_MAIN_CONF_PATH}/httpd.conf - sed -i -e "s/^Group apache/Group root/" ${HTTPD_MAIN_CONF_PATH}/httpd.conf - config_log_to_stdout - if [ -v HTTPD_LOG_TO_VOLUME ] ; then - echo "Error: Option HTTPD_LOG_TO_VOLUME is only valid for privileged runs (as UID 0)." - return 1 - fi -} - -config_mpm() { - if [ -v HTTPD_MPM -a -f ${HTTPD_MAIN_CONF_MODULES_D_PATH}/00-mpm.conf ]; then - local mpmconf=${HTTPD_MAIN_CONF_MODULES_D_PATH}/00-mpm.conf - sed -i -e 's,^LoadModule,#LoadModule,' ${mpmconf} - sed -i -e "/LoadModule mpm_${HTTPD_MPM}/s,^#LoadModule,LoadModule," ${mpmconf} - echo "---> Set MPM to ${HTTPD_MPM} in ${mpmconf}" - fi -} - -# get_matched_files finds file for image extending -function get_matched_files() { - local custom_dir default_dir - custom_dir="$1" - default_dir="$2" - files_matched="$3" - find "$default_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" - [ -d "$custom_dir" ] && find "$custom_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" -} - -# process_extending_files process extending files in $1 and $2 directories -# - source all *.sh files -# (if there are files with same name source only file from $1) -function process_extending_files() { - local custom_dir default_dir - custom_dir=$1 - default_dir=$2 - while read filename ; do - echo "=> sourcing $filename ..." - # Custom file is prefered - if [ -f $custom_dir/$filename ]; then - source $custom_dir/$filename - elif [ -f $default_dir/$filename ]; then - source $default_dir/$filename - fi - done <<<"$(get_matched_files "$custom_dir" "$default_dir" '*.sh' | sort -u)" -} - -# Set current user in nss_wrapper -generate_container_user() { - local passwd_output_dir="${HTTPD_APP_ROOT}/etc" - - export USER_ID=$(id -u) - export GROUP_ID=$(id -g) - cp ${HTTPD_CONTAINER_SCRIPTS_PATH}/passwd.template ${passwd_output_dir}/passwd - echo "default:x:${USER_ID}:${GROUP_ID}:Default Application User:${HOME}:/bin/bash" >> ${passwd_output_dir}/passwd - export LD_PRELOAD=libnss_wrapper.so - export NSS_WRAPPER_PASSWD=${passwd_output_dir}/passwd - export NSS_WRAPPER_GROUP=/etc/group -} - -# Copy config files from application to the location where httd expects them -# Param sets the directory where to look for files -process_config_files() { - local dir=${1:-.} - if [ -d ${dir}/httpd-cfg ]; then - echo "---> Copying httpd configuration files..." - if [ "$(ls -A ${dir}/httpd-cfg/*.conf)" ]; then - cp -v ${dir}/httpd-cfg/*.conf "${HTTPD_CONFIGURATION_PATH}" - rm -rf ${dir}/httpd-cfg - fi - else - if [ -d ${dir}/cfg ]; then - echo "---> Copying httpd configuration files from deprecated './cfg' directory, use './httpd-cfg' instead..." - if [ "$(ls -A ${dir}/cfg/*.conf)" ]; then - cp -v ${dir}/cfg/*.conf "${HTTPD_CONFIGURATION_PATH}" - rm -rf ${dir}/cfg - fi - fi - fi -} - -# Copy SSL files provided in application source -process_ssl_certs() { - local dir=${1:-.} - if [ -d ${dir}/httpd-ssl/private ] && [ -d ${dir}/httpd-ssl/certs ]; then - echo "---> Moving the httpd-ssl directory included in the source to a directory that isn't exposed by httpd..." - mv ${dir}/httpd-ssl ${HTTPD_APP_ROOT} - fi - if [ -d ${HTTPD_APP_ROOT}/httpd-ssl/private ] && [ -d ${HTTPD_APP_ROOT}/httpd-ssl/certs ]; then - echo "---> Looking for SSL certs for httpd..." - local ssl_cert="$(ls -A ${HTTPD_APP_ROOT}/httpd-ssl/certs/*.pem | head -n 1)" - local ssl_private="$(ls -A ${HTTPD_APP_ROOT}/httpd-ssl/private/*.pem | head -n 1)" - if [ -f "${ssl_cert}" ] ; then - # do sed for SSLCertificateFile and SSLCertificateKeyFile - echo "---> Setting SSL cert file for httpd..." - sed -i -e "s|^SSLCertificateFile .*$|SSLCertificateFile ${ssl_cert}|" ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf - if [ -f "${ssl_private}" ]; then - echo "---> Setting SSL key file for httpd..." - sed -i -e "s|^SSLCertificateKeyFile .*$|SSLCertificateKeyFile ${ssl_private}|" ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf - else - echo "---> Removing SSL key file settings for httpd..." - sed -i '/^SSLCertificateKeyFile .*/d' ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf - fi - else - # Generate TLS key pair if no SSL cert was found - gen_ssl_certs - fi - else - gen_ssl_certs - fi -} - diff --git a/2.4-micro/s2i b/2.4-micro/s2i new file mode 120000 index 00000000..97484fc8 --- /dev/null +++ b/2.4-micro/s2i @@ -0,0 +1 @@ +../src/s2i \ No newline at end of file diff --git a/2.4-micro/test b/2.4-micro/test new file mode 120000 index 00000000..419df4f9 --- /dev/null +++ b/2.4-micro/test @@ -0,0 +1 @@ +../test \ No newline at end of file diff --git a/2.4-micro/test/__init__.py b/2.4-micro/test/__init__.py deleted file mode 120000 index d0f4746a..00000000 --- a/2.4-micro/test/__init__.py +++ /dev/null @@ -1 +0,0 @@ -../../test/__init__.py \ No newline at end of file diff --git a/2.4-micro/test/check_imagestreams.py b/2.4-micro/test/check_imagestreams.py deleted file mode 120000 index 56bb2be7..00000000 --- a/2.4-micro/test/check_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../common/check_imagestreams.py \ No newline at end of file diff --git a/2.4-micro/test/conftest.py b/2.4-micro/test/conftest.py deleted file mode 120000 index 3f2d7840..00000000 --- a/2.4-micro/test/conftest.py +++ /dev/null @@ -1 +0,0 @@ -../../test/conftest.py \ No newline at end of file diff --git a/2.4-micro/test/examples b/2.4-micro/test/examples deleted file mode 120000 index da7b1965..00000000 --- a/2.4-micro/test/examples +++ /dev/null @@ -1 +0,0 @@ -../../examples/ \ No newline at end of file diff --git a/2.4-micro/test/imagestreams b/2.4-micro/test/imagestreams deleted file mode 120000 index 0dcbe9e0..00000000 --- a/2.4-micro/test/imagestreams +++ /dev/null @@ -1 +0,0 @@ -../../imagestreams/ \ No newline at end of file diff --git a/2.4-micro/test/run b/2.4-micro/test/run deleted file mode 120000 index 44977d63..00000000 --- a/2.4-micro/test/run +++ /dev/null @@ -1 +0,0 @@ -../../test/run \ No newline at end of file diff --git a/2.4-micro/test/run-openshift-pytest b/2.4-micro/test/run-openshift-pytest deleted file mode 120000 index 5063ae30..00000000 --- a/2.4-micro/test/run-openshift-pytest +++ /dev/null @@ -1 +0,0 @@ -../../test/run-openshift-pytest \ No newline at end of file diff --git a/2.4-micro/test/run-openshift-remote-cluster b/2.4-micro/test/run-openshift-remote-cluster deleted file mode 120000 index 1bffcba8..00000000 --- a/2.4-micro/test/run-openshift-remote-cluster +++ /dev/null @@ -1 +0,0 @@ -../../test/run-openshift-remote-cluster \ No newline at end of file diff --git a/2.4-micro/test/run-pytest b/2.4-micro/test/run-pytest deleted file mode 120000 index efe32b48..00000000 --- a/2.4-micro/test/run-pytest +++ /dev/null @@ -1 +0,0 @@ -../../test/run-pytest \ No newline at end of file diff --git a/2.4-micro/test/sample-test-app b/2.4-micro/test/sample-test-app deleted file mode 120000 index ba0a23be..00000000 --- a/2.4-micro/test/sample-test-app +++ /dev/null @@ -1 +0,0 @@ -../../examples/sample-test-app/ \ No newline at end of file diff --git a/2.4-micro/test/self-signed-ssl b/2.4-micro/test/self-signed-ssl deleted file mode 120000 index 1c1fd187..00000000 --- a/2.4-micro/test/self-signed-ssl +++ /dev/null @@ -1 +0,0 @@ -../../examples/self-signed-ssl/ \ No newline at end of file diff --git a/2.4-micro/test/settings.py b/2.4-micro/test/settings.py deleted file mode 120000 index 44504a45..00000000 --- a/2.4-micro/test/settings.py +++ /dev/null @@ -1 +0,0 @@ -../../test/settings.py \ No newline at end of file diff --git a/2.4-micro/test/test-lib-httpd.sh b/2.4-micro/test/test-lib-httpd.sh deleted file mode 120000 index 2b24e986..00000000 --- a/2.4-micro/test/test-lib-httpd.sh +++ /dev/null @@ -1 +0,0 @@ -../../test/test-lib-httpd.sh \ No newline at end of file diff --git a/2.4-micro/test/test-lib-openshift.sh b/2.4-micro/test/test-lib-openshift.sh deleted file mode 120000 index 4f9f2996..00000000 --- a/2.4-micro/test/test-lib-openshift.sh +++ /dev/null @@ -1 +0,0 @@ -../../common/test-lib-openshift.sh \ No newline at end of file diff --git a/2.4-micro/test/test-lib-remote-openshift.sh b/2.4-micro/test/test-lib-remote-openshift.sh deleted file mode 120000 index 92ad2f4d..00000000 --- a/2.4-micro/test/test-lib-remote-openshift.sh +++ /dev/null @@ -1 +0,0 @@ -../../common/test-lib-remote-openshift.sh \ No newline at end of file diff --git a/2.4-micro/test/test-lib.sh b/2.4-micro/test/test-lib.sh deleted file mode 120000 index 1ac99b93..00000000 --- a/2.4-micro/test/test-lib.sh +++ /dev/null @@ -1 +0,0 @@ -../../common/test-lib.sh \ No newline at end of file diff --git a/2.4-micro/test/test_container_httpd.py b/2.4-micro/test/test_container_httpd.py deleted file mode 120000 index 1c002d86..00000000 --- a/2.4-micro/test/test_container_httpd.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_container_httpd.py \ No newline at end of file diff --git a/2.4-micro/test/test_container_httpd_s2i.py b/2.4-micro/test/test_container_httpd_s2i.py deleted file mode 120000 index 6dbab8e8..00000000 --- a/2.4-micro/test/test_container_httpd_s2i.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_container_httpd_s2i.py \ No newline at end of file diff --git a/2.4-micro/test/test_ocp_ex_template.py b/2.4-micro/test/test_ocp_ex_template.py deleted file mode 120000 index 002c0c4a..00000000 --- a/2.4-micro/test/test_ocp_ex_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_ex_template.py \ No newline at end of file diff --git a/2.4-micro/test/test_ocp_imagestream_s2i.py b/2.4-micro/test/test_ocp_imagestream_s2i.py deleted file mode 120000 index 89eb6791..00000000 --- a/2.4-micro/test/test_ocp_imagestream_s2i.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_imagestream_s2i.py \ No newline at end of file diff --git a/2.4-micro/test/test_ocp_imagestreams.py b/2.4-micro/test/test_ocp_imagestreams.py deleted file mode 120000 index ee905e77..00000000 --- a/2.4-micro/test/test_ocp_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_imagestreams.py \ No newline at end of file diff --git a/2.4-micro/test/test_ocp_integration.py b/2.4-micro/test/test_ocp_integration.py deleted file mode 120000 index 12a7b4f0..00000000 --- a/2.4-micro/test/test_ocp_integration.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_integration.py \ No newline at end of file diff --git a/2.4-micro/test/test_ocp_shared_helm_imagestreams.py b/2.4-micro/test/test_ocp_shared_helm_imagestreams.py deleted file mode 120000 index 76d5701d..00000000 --- a/2.4-micro/test/test_ocp_shared_helm_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_shared_helm_imagestreams.py \ No newline at end of file diff --git a/2.4-micro/test/test_ocp_shared_helm_template.py b/2.4-micro/test/test_ocp_shared_helm_template.py deleted file mode 120000 index 9cf469bf..00000000 --- a/2.4-micro/test/test_ocp_shared_helm_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_shared_helm_template.py \ No newline at end of file diff --git a/2.4/root b/2.4/root new file mode 120000 index 00000000..bb2cc8d2 --- /dev/null +++ b/2.4/root @@ -0,0 +1 @@ +../src/root \ No newline at end of file diff --git a/2.4/root/usr/bin/run-httpd b/2.4/root/usr/bin/run-httpd deleted file mode 100755 index e03578fd..00000000 --- a/2.4/root/usr/bin/run-httpd +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -eu - -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -# Check whether we run as s2i -if ! [ -v HTTPD_RUN_BY_S2I ] && runs_privileged ; then - config_privileged -else - # We run as non-root or as s2i - config_non_privileged - generate_container_user -fi - -process_extending_files ${HTTPD_APP_ROOT}/src/httpd-pre-init/ ${HTTPD_CONTAINER_SCRIPTS_PATH}/pre-init/ - -exec httpd -D FOREGROUND $@ diff --git a/2.4/root/usr/libexec/httpd-prepare b/2.4/root/usr/libexec/httpd-prepare deleted file mode 100755 index 3454cd1d..00000000 --- a/2.4/root/usr/libexec/httpd-prepare +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -set -e - -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -mkdir -p ${HTTPD_CONFIGURATION_PATH} -chmod -R a+rwx ${HTTPD_MAIN_CONF_PATH} -chmod -R a+rwx ${HTTPD_MAIN_CONF_D_PATH} -chmod -R a+rwx ${HTTPD_MAIN_CONF_MODULES_D_PATH} -mkdir -p ${HTTPD_APP_ROOT}/etc -chmod -R a+rwx ${HTTPD_APP_ROOT}/etc -chmod -R a+rwx ${HTTPD_VAR_RUN} -chown -R 1001:0 ${HTTPD_APP_ROOT} -chown -R 1001:0 ${HTTPD_DATA_PATH} -chmod -R g+rwx ${HTTPD_LOG_PATH} -chown -R 1001:0 ${HTTPD_LOG_PATH} - -# remove bundled key pair and create new dir, where we store it -rm -f /etc/pki/tls/certs/localhost.crt -rm -f /etc/pki/tls/private/localhost.key -mkdir -p $HTTPD_TLS_CERT_PATH -chmod -R a+rwx $HTTPD_TLS_CERT_PATH - -mkdir -p ${HTTPD_CONTAINER_SCRIPTS_PATH}/pre-init - -config_general - diff --git a/2.4/root/usr/share/container-scripts/httpd/passwd.template b/2.4/root/usr/share/container-scripts/httpd/passwd.template deleted file mode 100644 index c937416f..00000000 --- a/2.4/root/usr/share/container-scripts/httpd/passwd.template +++ /dev/null @@ -1,14 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -bin:x:1:1:bin:/bin:/sbin/nologin -daemon:x:2:2:daemon:/sbin:/sbin/nologin -adm:x:3:4:adm:/var/adm:/sbin/nologin -lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin -sync:x:5:0:sync:/sbin:/bin/sync -shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown -halt:x:7:0:halt:/sbin:/sbin/halt -mail:x:8:12:mail:/var/spool/mail:/sbin/nologin -operator:x:11:0:operator:/root:/sbin/nologin -games:x:12:100:games:/usr/games:/sbin/nologin -ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin -nobody:x:99:99:Nobody:/:/sbin/nologin -apache:x:48:48:Apache:/usr/share/httpd:/sbin/nologin diff --git a/2.4/root/usr/share/container-scripts/httpd/post-assemble/20-copy-config.sh b/2.4/root/usr/share/container-scripts/httpd/post-assemble/20-copy-config.sh deleted file mode 100644 index 2fd03c7d..00000000 --- a/2.4/root/usr/share/container-scripts/httpd/post-assemble/20-copy-config.sh +++ /dev/null @@ -1,4 +0,0 @@ -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -# Copy config files from application to the location where httpd expects them -process_config_files diff --git a/2.4/root/usr/share/container-scripts/httpd/post-assemble/40-ssl-certs.sh b/2.4/root/usr/share/container-scripts/httpd/post-assemble/40-ssl-certs.sh deleted file mode 100644 index cbad2c37..00000000 --- a/2.4/root/usr/share/container-scripts/httpd/post-assemble/40-ssl-certs.sh +++ /dev/null @@ -1,4 +0,0 @@ -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -# Copy SSL files provided in application source -process_ssl_certs diff --git a/2.4/root/usr/share/container-scripts/httpd/pre-init/10-set-mpm.sh b/2.4/root/usr/share/container-scripts/httpd/pre-init/10-set-mpm.sh deleted file mode 100644 index f7de4959..00000000 --- a/2.4/root/usr/share/container-scripts/httpd/pre-init/10-set-mpm.sh +++ /dev/null @@ -1,3 +0,0 @@ -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -config_mpm diff --git a/2.4/root/usr/share/container-scripts/httpd/pre-init/20-copy-config.sh b/2.4/root/usr/share/container-scripts/httpd/pre-init/20-copy-config.sh deleted file mode 100644 index f7ce08b5..00000000 --- a/2.4/root/usr/share/container-scripts/httpd/pre-init/20-copy-config.sh +++ /dev/null @@ -1,4 +0,0 @@ -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -# Copy config files from application to the location where httd expects them -process_config_files ${HTTPD_APP_ROOT}/src diff --git a/2.4/root/usr/share/container-scripts/httpd/pre-init/40-ssl-certs.sh b/2.4/root/usr/share/container-scripts/httpd/pre-init/40-ssl-certs.sh deleted file mode 100644 index 38bc8cf3..00000000 --- a/2.4/root/usr/share/container-scripts/httpd/pre-init/40-ssl-certs.sh +++ /dev/null @@ -1,4 +0,0 @@ -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -# Copy SSL files provided in application source -process_ssl_certs ${HTTPD_APP_ROOT}/src diff --git a/2.4/s2i b/2.4/s2i new file mode 120000 index 00000000..97484fc8 --- /dev/null +++ b/2.4/s2i @@ -0,0 +1 @@ +../src/s2i \ No newline at end of file diff --git a/2.4/s2i/bin/assemble b/2.4/s2i/bin/assemble deleted file mode 100755 index ad6f7c8b..00000000 --- a/2.4/s2i/bin/assemble +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -set -e - -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -echo "---> Enabling s2i support in httpd24 image" - -config_s2i - -echo "---> Installing application source" -cp -af /tmp/src/. ./ -rm -rf ./.hg ./.git ./.svn - -# Fix source directory permissions -fix-permissions ./ - -process_extending_files ${HTTPD_APP_ROOT}/src/httpd-post-assemble/ ${HTTPD_CONTAINER_SCRIPTS_PATH}/post-assemble/ - -# Fix source directory permissions -fix-permissions ./ diff --git a/2.4/s2i/bin/run b/2.4/s2i/bin/run deleted file mode 100755 index f8f8aa39..00000000 --- a/2.4/s2i/bin/run +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -export HTTPD_RUN_BY_S2I=1 - -exec run-httpd $@ diff --git a/2.4/s2i/bin/usage b/2.4/s2i/bin/usage deleted file mode 100755 index 9ebe8e2a..00000000 --- a/2.4/s2i/bin/usage +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -DISTRO=`cat /etc/*-release | grep ^ID= | grep -Po '".*?"' | tr -d '"'` -NAMESPACE=sclorg -if [[ $DISTRO =~ rhel* ]]; then - NAMESPACE=rhel10 - DISTRO="" -else - DISTRO="-c10s" -fi - -cat < ${HTTPD_APP_ROOT}/src/index.html diff --git a/2.4/test/pre-init-test-app/index.html b/2.4/test/pre-init-test-app/index.html deleted file mode 100644 index 38f417d0..00000000 --- a/2.4/test/pre-init-test-app/index.html +++ /dev/null @@ -1 +0,0 @@ -This is a sample s2i application with static content. diff --git a/2.4/test/run b/2.4/test/run deleted file mode 120000 index 44977d63..00000000 --- a/2.4/test/run +++ /dev/null @@ -1 +0,0 @@ -../../test/run \ No newline at end of file diff --git a/2.4/test/run-openshift-pytest b/2.4/test/run-openshift-pytest deleted file mode 120000 index 5063ae30..00000000 --- a/2.4/test/run-openshift-pytest +++ /dev/null @@ -1 +0,0 @@ -../../test/run-openshift-pytest \ No newline at end of file diff --git a/2.4/test/run-openshift-remote-cluster b/2.4/test/run-openshift-remote-cluster deleted file mode 120000 index 1bffcba8..00000000 --- a/2.4/test/run-openshift-remote-cluster +++ /dev/null @@ -1 +0,0 @@ -../../test/run-openshift-remote-cluster \ No newline at end of file diff --git a/2.4/test/run-pytest b/2.4/test/run-pytest deleted file mode 120000 index efe32b48..00000000 --- a/2.4/test/run-pytest +++ /dev/null @@ -1 +0,0 @@ -../../test/run-pytest \ No newline at end of file diff --git a/2.4/test/sample-test-app b/2.4/test/sample-test-app deleted file mode 120000 index ba0a23be..00000000 --- a/2.4/test/sample-test-app +++ /dev/null @@ -1 +0,0 @@ -../../examples/sample-test-app/ \ No newline at end of file diff --git a/2.4/test/self-signed-ssl b/2.4/test/self-signed-ssl deleted file mode 120000 index 1c1fd187..00000000 --- a/2.4/test/self-signed-ssl +++ /dev/null @@ -1 +0,0 @@ -../../examples/self-signed-ssl/ \ No newline at end of file diff --git a/2.4/test/settings.py b/2.4/test/settings.py deleted file mode 120000 index 44504a45..00000000 --- a/2.4/test/settings.py +++ /dev/null @@ -1 +0,0 @@ -../../test/settings.py \ No newline at end of file diff --git a/2.4/test/test-lib-httpd.sh b/2.4/test/test-lib-httpd.sh deleted file mode 120000 index 2b24e986..00000000 --- a/2.4/test/test-lib-httpd.sh +++ /dev/null @@ -1 +0,0 @@ -../../test/test-lib-httpd.sh \ No newline at end of file diff --git a/2.4/test/test-lib-openshift.sh b/2.4/test/test-lib-openshift.sh deleted file mode 120000 index 4f9f2996..00000000 --- a/2.4/test/test-lib-openshift.sh +++ /dev/null @@ -1 +0,0 @@ -../../common/test-lib-openshift.sh \ No newline at end of file diff --git a/2.4/test/test-lib-remote-openshift.sh b/2.4/test/test-lib-remote-openshift.sh deleted file mode 120000 index 92ad2f4d..00000000 --- a/2.4/test/test-lib-remote-openshift.sh +++ /dev/null @@ -1 +0,0 @@ -../../common/test-lib-remote-openshift.sh \ No newline at end of file diff --git a/2.4/test/test-lib.sh b/2.4/test/test-lib.sh deleted file mode 120000 index 1ac99b93..00000000 --- a/2.4/test/test-lib.sh +++ /dev/null @@ -1 +0,0 @@ -../../common/test-lib.sh \ No newline at end of file diff --git a/2.4/test/test-openshift.yaml b/2.4/test/test-openshift.yaml deleted file mode 120000 index 8613fbba..00000000 --- a/2.4/test/test-openshift.yaml +++ /dev/null @@ -1 +0,0 @@ -../../common/test-openshift.yaml \ No newline at end of file diff --git a/2.4/test/test_container_httpd.py b/2.4/test/test_container_httpd.py deleted file mode 120000 index 1c002d86..00000000 --- a/2.4/test/test_container_httpd.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_container_httpd.py \ No newline at end of file diff --git a/2.4/test/test_container_httpd_s2i.py b/2.4/test/test_container_httpd_s2i.py deleted file mode 120000 index 6dbab8e8..00000000 --- a/2.4/test/test_container_httpd_s2i.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_container_httpd_s2i.py \ No newline at end of file diff --git a/2.4/test/test_ocp_ex_template.py b/2.4/test/test_ocp_ex_template.py deleted file mode 120000 index 002c0c4a..00000000 --- a/2.4/test/test_ocp_ex_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_ex_template.py \ No newline at end of file diff --git a/2.4/test/test_ocp_imagestream_s2i.py b/2.4/test/test_ocp_imagestream_s2i.py deleted file mode 120000 index 89eb6791..00000000 --- a/2.4/test/test_ocp_imagestream_s2i.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_imagestream_s2i.py \ No newline at end of file diff --git a/2.4/test/test_ocp_imagestreams.py b/2.4/test/test_ocp_imagestreams.py deleted file mode 120000 index ee905e77..00000000 --- a/2.4/test/test_ocp_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_imagestreams.py \ No newline at end of file diff --git a/2.4/test/test_ocp_integration.py b/2.4/test/test_ocp_integration.py deleted file mode 120000 index 12a7b4f0..00000000 --- a/2.4/test/test_ocp_integration.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_integration.py \ No newline at end of file diff --git a/2.4/test/test_ocp_shared_helm_imagestreams.py b/2.4/test/test_ocp_shared_helm_imagestreams.py deleted file mode 120000 index 76d5701d..00000000 --- a/2.4/test/test_ocp_shared_helm_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_shared_helm_imagestreams.py \ No newline at end of file diff --git a/2.4/test/test_ocp_shared_helm_template.py b/2.4/test/test_ocp_shared_helm_template.py deleted file mode 120000 index 9cf469bf..00000000 --- a/2.4/test/test_ocp_shared_helm_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_shared_helm_template.py \ No newline at end of file diff --git a/2.4/test/utils.sh b/2.4/test/utils.sh deleted file mode 100755 index 525c3e21..00000000 --- a/2.4/test/utils.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -function print_result { - local RESET='\e[0m' - local RED='\e[0;31m' - local GREEN='\e[0;32m' - local YELLOW='\e[1;33m' - local PASS="${RESET}${GREEN}[PASS]" - local FAIL="${RESET}${RED}[FAIL]" - local WORKING="${RESET}${YELLOW}[....]" - local STATUS="$1" - shift - - if [ "${STATUS}" = pass ]; then - echo -en "${PASS}" - elif [ "${STATUS}" = fail ]; then - echo -en "${FAIL}" - elif [ "${STATUS}" = working ]; then - echo -en "${WORKING}" - else - return - fi - - echo -en " ${@}${RESET}" - echo -} - -function get_status { - if [ "$1" = "$2" ]; then - echo pass - else - echo fail - fi -} - -function run_command { - local cmd="$1" - local expected="${2:-0}" - local msg="${3:-Running command '$cmd'}" - print_result working "$msg" - eval $cmd - local res="$?" - status=`get_status "$res" "$expected"` - print_result "$status" "$msg" - return "$res" -} diff --git a/README.md b/README.md index 81b625b2..2a90d472 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Table start --> ||CentOS Stream 9|CentOS Stream 10|Fedora|RHEL 8|RHEL 9|RHEL 10| |:--|:--:|:--:|:--:|:--:|:--:|:--:| -|2.4-micro|
`quay.io/sclorg/httpd-24-micro-c9s`
|
`quay.io/sclorg/httpd-24-micro-c10s`
|
`quay.io/fedora/httpd-24-micro`
|||| +|2.4-micro||||||| |2.4|
`quay.io/sclorg/httpd-24-c9s`
|
`quay.io/sclorg/httpd-24-c10s`
|
`quay.io/fedora/httpd-24`
|
`registry.redhat.io/rhel8/httpd-24`
|
`registry.redhat.io/rhel9/httpd-24`
|
`registry.redhat.io/rhel10/httpd-24`
|