Skip to content

Commit 1d56ad6

Browse files
committed
generated sources for micro
1 parent 5570e91 commit 1d56ad6

10 files changed

Lines changed: 402 additions & 2 deletions

File tree

2.4-micro/2.4

Lines changed: 0 additions & 1 deletion
This file was deleted.

2.4-micro/Dockerfile.c10s

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
FROM quay.io/centos/centos:stream10-development AS build
2+
3+
RUN mkdir -p /mnt/rootfs
4+
RUN MICRO_PKGS="coreutils-single glibc-minimal-langpack" && \
5+
INSTALL_PKGS="${MICRO_PKGS} httpd-core mod_ssl findutils hostname nss_wrapper-libs redhat-logos-httpd" && \
6+
dnf install --installroot /mnt/rootfs ${INSTALL_PKGS} --releasever 10 --setopt install_weak_deps=false --nodocs -y && \
7+
dnf -y --installroot /mnt/rootfs clean all && \
8+
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*
9+
10+
FROM scratch
11+
# Apache HTTP Server image.
12+
#
13+
# Volumes:
14+
# * /var/www - Datastore for httpd
15+
# * /var/log/httpd24 - Storage for logs when $HTTPD_LOG_TO_VOLUME is set
16+
# Environment:
17+
# * $HTTPD_LOG_TO_VOLUME (optional) - When set, httpd will log into /var/log/httpd24
18+
19+
ENV HTTPD_VERSION=2.4 \
20+
HTTPD_SHORT_VERSION=24 \
21+
NAME=httpd
22+
23+
ENV SUMMARY="Platform for running Apache httpd ${HTTPD_VERSION} or building httpd-based application" \
24+
DESCRIPTION="Apache httpd ${HTTPD_VERSION} available as container, is a powerful, efficient, \
25+
and extensible web server. Apache supports a variety of features, many implemented as compiled modules \
26+
which extend the core functionality. \
27+
These can range from server-side programming language support to authentication schemes. \
28+
Virtual hosting allows one Apache installation to serve many different Web sites." \
29+
# The following variables are usually available from parent s2i images \
30+
STI_SCRIPTS_PATH=/usr/libexec/s2i \
31+
APP_ROOT=/opt/app-root \
32+
HOME=/opt/app-root/src \
33+
PLATFORM="el10"
34+
35+
LABEL summary="${SUMMARY}" \
36+
description="${DESCRIPTION}" \
37+
io.k8s.description="${DESCRIPTION}" \
38+
io.k8s.display-name="Apache httpd ${HTTPD_VERSION}" \
39+
io.openshift.expose-services="8080:http,8443:https" \
40+
io.openshift.tags="builder,${NAME},${NAME}-${HTTPD_SHORT_VERSION}" \
41+
name="sclorg/${NAME}-${HTTPD_SHORT_VERSION}-micro-c10s" \
42+
version="1" \
43+
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" \
44+
maintainer="SoftwareCollections.org <sclorg@redhat.com>"
45+
46+
EXPOSE 8080
47+
EXPOSE 8443
48+
49+
COPY --from=build /mnt/rootfs/ /
50+
51+
ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \
52+
HTTPD_APP_ROOT=${APP_ROOT} \
53+
HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/httpd.d \
54+
HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
55+
HTTPD_MAIN_CONF_MODULES_D_PATH=/etc/httpd/conf.modules.d \
56+
HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
57+
HTTPD_TLS_CERT_PATH=/etc/httpd/tls \
58+
HTTPD_VAR_RUN=/var/run/httpd \
59+
HTTPD_DATA_PATH=/var/www \
60+
HTTPD_DATA_ORIG_PATH=/var/www \
61+
HTTPD_LOG_PATH=/var/log/httpd
62+
63+
COPY 2.4-micro/s2i/bin/ ${STI_SCRIPTS_PATH}
64+
COPY 2.4-micro/root /
65+
COPY 2.4-micro/core-scripts/usr /usr
66+
67+
WORKDIR ${HOME}
68+
69+
RUN useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \
70+
chown -R 1001:0 ${APP_ROOT} && \
71+
httpd -v | grep -qe "Apache/${HTTPD_VERSION}" && echo "Found VERSION ${HTTPD_VERSION}" && \
72+
/usr/libexec/httpd-prepare
73+
74+
USER 1001
75+
76+
# Not using VOLUME statement since it's not working in OpenShift Online:
77+
# https://github.com/sclorg/httpd-container/issues/30
78+
# VOLUME ["${HTTPD_DATA_PATH}"]
79+
# VOLUME ["${HTTPD_LOG_PATH}"]
80+
81+
CMD ["/usr/bin/run-httpd"]

2.4-micro/Dockerfile.c9s

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
FROM quay.io/centos/centos:stream9 AS build
2+
3+
RUN mkdir -p /mnt/rootfs
4+
RUN MICRO_PKGS="coreutils-single glibc-minimal-langpack" && \
5+
INSTALL_PKGS="${MICRO_PKGS} httpd-core mod_ssl findutils hostname nss_wrapper-libs redhat-logos-httpd" && \
6+
dnf install --installroot /mnt/rootfs ${INSTALL_PKGS} --releasever 9 --setopt install_weak_deps=false --nodocs -y && \
7+
dnf -y --installroot /mnt/rootfs clean all && \
8+
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*
9+
10+
FROM scratch
11+
# Apache HTTP Server image.
12+
#
13+
# Volumes:
14+
# * /var/www - Datastore for httpd
15+
# * /var/log/httpd24 - Storage for logs when $HTTPD_LOG_TO_VOLUME is set
16+
# Environment:
17+
# * $HTTPD_LOG_TO_VOLUME (optional) - When set, httpd will log into /var/log/httpd24
18+
19+
ENV HTTPD_VERSION=2.4 \
20+
HTTPD_SHORT_VERSION=24 \
21+
NAME=httpd
22+
23+
ENV SUMMARY="Platform for running Apache httpd ${HTTPD_VERSION} or building httpd-based application" \
24+
DESCRIPTION="Apache httpd ${HTTPD_VERSION} available as container, is a powerful, efficient, \
25+
and extensible web server. Apache supports a variety of features, many implemented as compiled modules \
26+
which extend the core functionality. \
27+
These can range from server-side programming language support to authentication schemes. \
28+
Virtual hosting allows one Apache installation to serve many different Web sites." \
29+
# The following variables are usually available from parent s2i images \
30+
STI_SCRIPTS_PATH=/usr/libexec/s2i \
31+
APP_ROOT=/opt/app-root \
32+
HOME=/opt/app-root/src \
33+
PLATFORM="el9"
34+
35+
LABEL summary="${SUMMARY}" \
36+
description="${DESCRIPTION}" \
37+
io.k8s.description="${DESCRIPTION}" \
38+
io.k8s.display-name="Apache httpd ${HTTPD_VERSION}" \
39+
io.openshift.expose-services="8080:http,8443:https" \
40+
io.openshift.tags="builder,${NAME},${NAME}-${HTTPD_SHORT_VERSION}" \
41+
name="sclorg/${NAME}-${HTTPD_SHORT_VERSION}-micro-c9s" \
42+
version="1" \
43+
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" \
44+
maintainer="SoftwareCollections.org <sclorg@redhat.com>"
45+
46+
EXPOSE 8080
47+
EXPOSE 8443
48+
49+
COPY --from=build /mnt/rootfs/ /
50+
51+
ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \
52+
HTTPD_APP_ROOT=${APP_ROOT} \
53+
HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/httpd.d \
54+
HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
55+
HTTPD_MAIN_CONF_MODULES_D_PATH=/etc/httpd/conf.modules.d \
56+
HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
57+
HTTPD_TLS_CERT_PATH=/etc/httpd/tls \
58+
HTTPD_VAR_RUN=/var/run/httpd \
59+
HTTPD_DATA_PATH=/var/www \
60+
HTTPD_DATA_ORIG_PATH=/var/www \
61+
HTTPD_LOG_PATH=/var/log/httpd
62+
63+
COPY 2.4-micro/s2i/bin/ ${STI_SCRIPTS_PATH}
64+
COPY 2.4-micro/root /
65+
COPY 2.4-micro/core-scripts/usr /usr
66+
67+
WORKDIR ${HOME}
68+
69+
RUN useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \
70+
chown -R 1001:0 ${APP_ROOT} && \
71+
httpd -v | grep -qe "Apache/${HTTPD_VERSION}" && echo "Found VERSION ${HTTPD_VERSION}" && \
72+
/usr/libexec/httpd-prepare
73+
74+
USER 1001
75+
76+
# Not using VOLUME statement since it's not working in OpenShift Online:
77+
# https://github.com/sclorg/httpd-container/issues/30
78+
# VOLUME ["${HTTPD_DATA_PATH}"]
79+
# VOLUME ["${HTTPD_LOG_PATH}"]
80+
81+
CMD ["/usr/bin/run-httpd"]

2.4-micro/Dockerfile.fedora

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
FROM quay.io/fedora/fedora:42 AS build
2+
3+
RUN mkdir -p /mnt/rootfs
4+
RUN MICRO_PKGS="coreutils-single glibc-minimal-langpack" && \
5+
INSTALL_PKGS="${MICRO_PKGS} httpd-core mod_ssl findutils hostname nss_wrapper-libs fedora-logos-httpd" && \
6+
dnf install --installroot /mnt/rootfs ${INSTALL_PKGS} --releasever 42 --use-host-config --setopt install_weak_deps=false --nodocs -y && \
7+
dnf -y --installroot /mnt/rootfs clean all && \
8+
rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.*
9+
10+
FROM scratch
11+
# Apache HTTP Server image.
12+
#
13+
# Volumes:
14+
# * /var/www - Datastore for httpd
15+
# * /var/log/httpd24 - Storage for logs when $HTTPD_LOG_TO_VOLUME is set
16+
# Environment:
17+
# * $HTTPD_LOG_TO_VOLUME (optional) - When set, httpd will log into /var/log/httpd24
18+
19+
ENV HTTPD_VERSION=2.4 \
20+
HTTPD_SHORT_VERSION=24 \
21+
NAME=httpd
22+
23+
ENV SUMMARY="Platform for running Apache httpd ${HTTPD_VERSION} or building httpd-based application" \
24+
DESCRIPTION="Apache httpd ${HTTPD_VERSION} available as container, is a powerful, efficient, \
25+
and extensible web server. Apache supports a variety of features, many implemented as compiled modules \
26+
which extend the core functionality. \
27+
These can range from server-side programming language support to authentication schemes. \
28+
Virtual hosting allows one Apache installation to serve many different Web sites." \
29+
# The following variables are usually available from parent s2i images \
30+
STI_SCRIPTS_PATH=/usr/libexec/s2i \
31+
APP_ROOT=/opt/app-root \
32+
HOME=/opt/app-root/src \
33+
PLATFORM="fedora"
34+
35+
LABEL summary="${SUMMARY}" \
36+
description="${DESCRIPTION}" \
37+
io.k8s.description="${DESCRIPTION}" \
38+
io.k8s.display-name="Apache httpd ${HTTPD_VERSION}" \
39+
io.openshift.expose-services="8080:http,8443:https" \
40+
io.openshift.tags="builder,${NAME},${NAME}-${HTTPD_SHORT_VERSION}" \
41+
name="fedora/${NAME}-${HTTPD_SHORT_VERSION}-micro" \
42+
version="1" \
43+
usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ fedora/${NAME}-${HTTPD_SHORT_VERSION}-micro sample-server" \
44+
maintainer="SoftwareCollections.org <sclorg@redhat.com>"
45+
46+
EXPOSE 8080
47+
EXPOSE 8443
48+
49+
COPY --from=build /mnt/rootfs/ /
50+
51+
ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \
52+
HTTPD_APP_ROOT=${APP_ROOT} \
53+
HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/httpd.d \
54+
HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
55+
HTTPD_MAIN_CONF_MODULES_D_PATH=/etc/httpd/conf.modules.d \
56+
HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
57+
HTTPD_TLS_CERT_PATH=/etc/httpd/tls \
58+
HTTPD_VAR_RUN=/var/run/httpd \
59+
HTTPD_DATA_PATH=/var/www \
60+
HTTPD_DATA_ORIG_PATH=/var/www \
61+
HTTPD_LOG_PATH=/var/log/httpd
62+
63+
COPY 2.4-micro/s2i/bin/ ${STI_SCRIPTS_PATH}
64+
COPY 2.4-micro/root /
65+
COPY 2.4-micro/core-scripts/usr /usr
66+
67+
WORKDIR ${HOME}
68+
69+
RUN useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \
70+
chown -R 1001:0 ${APP_ROOT} && \
71+
httpd -v | grep -qe "Apache/${HTTPD_VERSION}" && echo "Found VERSION ${HTTPD_VERSION}" && \
72+
/usr/libexec/httpd-prepare
73+
74+
USER 1001
75+
76+
# Not using VOLUME statement since it's not working in OpenShift Online:
77+
# https://github.com/sclorg/httpd-container/issues/30
78+
# VOLUME ["${HTTPD_DATA_PATH}"]
79+
# VOLUME ["${HTTPD_LOG_PATH}"]
80+
81+
CMD ["/usr/bin/run-httpd"]

2.4-micro/core-scripts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../common/shared-scripts/core

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,14 @@ DOCKER_BUILD_CONTEXT = ..
99
.PHONY: $(shell test -f common/common.mk || echo >&2 'Please do "git submodule update --init" first.')
1010

1111
include common/common.mk
12+
13+
generate:
14+
for version in ${VERSIONS} ; do \
15+
if [[ "$$version" == *-micro ]]; then \
16+
$(generator) -v $$version -m manifest-micro.yml -s specs/multispec.yml ; \
17+
elif [[ "$$version" == *-minimal ]]; then \
18+
$(generator) -v $$version -m manifest-minimal.yml -s specs/multispec.yml ; \
19+
else \
20+
$(generator) -v $$version -m manifest.yml -s specs/multispec.yml ; \
21+
fi \
22+
done

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Table start
2020
-->
2121
||CentOS Stream 9|CentOS Stream 10|Fedora|RHEL 8|RHEL 9|RHEL 10|
2222
|:--|:--:|:--:|:--:|:--:|:--:|:--:|
23-
|2.4-micro|||||||
23+
|2.4-micro|<details><summary>✓</summary>`quay.io/sclorg/httpd-24-micro-c9s`</details>|<details><summary>✓</summary>`quay.io/sclorg/httpd-24-micro-c10s`</details>|<details><summary>✓</summary>`quay.io/fedora/httpd-24-micro`</details>||||
2424
|2.4|<details><summary>✓</summary>`quay.io/sclorg/httpd-24-c9s`</details>|<details><summary>✓</summary>`quay.io/sclorg/httpd-24-c10s`</details>|<details><summary>✓</summary>`quay.io/fedora/httpd-24`</details>|<details><summary>✓</summary>`registry.redhat.io/rhel8/httpd-24`</details>|<details><summary>✓</summary>`registry.redhat.io/rhel9/httpd-24`</details>|<details><summary>✓</summary>`registry.redhat.io/rhel10/httpd-24`</details>|
2525
<!--
2626
Table end

manifest-micro.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Manifest for micro image directories creation
2+
# every dest path will be prefixed by $DESTDIR/$version
3+
4+
# Files containing distgen directives, which are used for each
5+
# (distro, version) combination not excluded in multispec
6+
DISTGEN_MULTI_RULES:
7+
- src: src/Dockerfile.micro
8+
dest: Dockerfile.c9s
9+
10+
- src: src/Dockerfile.micro
11+
dest: Dockerfile.c10s
12+
13+
- src: src/Dockerfile.micro
14+
dest: Dockerfile.fedora
15+
16+
17+
# Symbolic links
18+
# This section is the last one on purpose because the generator.py
19+
# does not allow dead symlinks.
20+
SYMLINK_RULES:
21+
- src: ../src/root
22+
dest: root
23+
24+
- src: root/usr/share/container-scripts/httpd/README.md
25+
dest: README.md
26+
27+
- src: ../src/s2i
28+
dest: s2i
29+
30+
- src: ../common/shared-scripts/core
31+
dest: core-scripts
32+
33+
- src: ../test
34+
dest: test

specs/multispec.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ specs:
7575
version_label: "1"
7676
license_terms: "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI"
7777
usage_image: "quay.io/{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}-{{ spec.prod }}"
78+
micro_build_base: "quay.io/centos/centos:stream9"
79+
micro_releasever: "9"
80+
micro_pkgs: "httpd-core mod_ssl findutils hostname nss_wrapper-libs redhat-logos-httpd"
81+
micro_platform: "el9"
82+
micro_img_name: "{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}-micro-{{ spec.prod }}"
7883

7984
c10s:
8085
distros:
@@ -93,6 +98,11 @@ specs:
9398
version_label: "1"
9499
license_terms: "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI"
95100
usage_image: "quay.io/{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}-{{ spec.prod }}"
101+
micro_build_base: "quay.io/centos/centos:stream10-development"
102+
micro_releasever: "10"
103+
micro_pkgs: "httpd-core mod_ssl findutils hostname nss_wrapper-libs redhat-logos-httpd"
104+
micro_platform: "el10"
105+
micro_img_name: "{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}-micro-{{ spec.prod }}"
96106

97107
fedora42:
98108
distros:
@@ -114,13 +124,24 @@ specs:
114124
license_terms: ""
115125
usage_image: "quya.io/{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}"
116126
fedora_specific: true
127+
micro_build_base: "quay.io/fedora/fedora:42"
128+
micro_releasever: "42"
129+
micro_pkgs: "httpd-core mod_ssl findutils hostname nss_wrapper-libs fedora-logos-httpd"
130+
micro_platform: "fedora"
131+
micro_use_host_config: true
132+
micro_img_name: "{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}-micro"
117133

118134
version:
119135
"2.4":
120136
version: "2.4"
121137
short: "24"
122138
common_image_name: "{{ spec.org }}/httpd-{{ spec.short }}-{{ spec.prod }}"
123139

140+
"2.4-micro":
141+
version: "2.4"
142+
short: "24"
143+
suffix: "-micro"
144+
124145
matrix:
125146
include:
126147
- version: "2.4"
@@ -131,3 +152,9 @@ matrix:
131152
- centos-stream-9-x86_64
132153
- centos-stream-10-x86_64
133154
- fedora-42-x86_64
155+
156+
- version: "2.4-micro"
157+
distros:
158+
- centos-stream-9-x86_64
159+
- centos-stream-10-x86_64
160+
- fedora-42-x86_64

0 commit comments

Comments
 (0)