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
16 changes: 16 additions & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ jobs:
tag: "8.3"
image_name: "php-83"

- dockerfile: "8.4/Dockerfile.fedora"
docker_context: "8.4"
registry_namespace: "fedora"
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN"
tag: "8.4"
image_name: "php-84"

- dockerfile: "8.4/Dockerfile.c10s"
docker_context: "8.4"
registry_namespace: "sclorg"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"
tag: "c10s"
image_name: "php-84-c10s"

- dockerfile: "8.3/Dockerfile.c10s"
docker_context: "8.3"
registry_namespace: "sclorg"
Expand Down
2 changes: 1 addition & 1 deletion 8.3/test/examples
2 changes: 1 addition & 1 deletion 8.3/test/imagestreams
2 changes: 1 addition & 1 deletion 8.3/test/self-signed-ssl
2 changes: 1 addition & 1 deletion 8.3/test/test-app
Empty file added 8.4/.exclude-c9s
Empty file.
Empty file added 8.4/.exclude-rhel9
Empty file.
92 changes: 92 additions & 0 deletions 8.4/Dockerfile.c10s
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
FROM quay.io/sclorg/s2i-base-c10s:c10s

# This image provides an Apache+PHP environment for running PHP
# applications.

EXPOSE 8080
EXPOSE 8443

# Description
# This image provides an Apache 2.4 + PHP 8.4 environment for running PHP applications.
# Exposed ports:
# * 8080 - alternative port for http

ENV PHP_VERSION=8.4 \
PHP_VER_SHORT=84 \
NAME=php

ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
building and running various PHP $PHP_VERSION applications and frameworks. \
PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
to write dynamically generated web pages. PHP also offers built-in database integration \
for several commercial and non-commercial database management systems, so writing \
a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
is probably as a replacement for CGI scripts."

LABEL summary="${SUMMARY}" \
description="${DESCRIPTION}" \
io.k8s.description="${DESCRIPTION}" \
io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
io.s2i.scripts-url="image:///usr/libexec/s2i" \
name="sclorg/${NAME}-${PHP_VER_SHORT}-c10s" \
com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
version="1" \
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app sclorg/${NAME}-${PHP_VER_SHORT}-c10s sample-server" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"

# Install Apache httpd and PHP
ARG INSTALL_PKGS="php${PHP_VERSION} php${PHP_VERSION}-fpm mod_ssl hostname"
ARG INSTALL_EXTS="php${PHP_VERSION}-mysqlnd php${PHP_VERSION}-pgsql php${PHP_VERSION}-bcmath \
php${PHP_VERSION}-gd php${PHP_VERSION}-intl php${PHP_VERSION}-ldap php${PHP_VERSION}-mbstring php${PHP_VERSION}-pdo \
php${PHP_VERSION}-process php${PHP_VERSION}-soap php${PHP_VERSION}-xml \
php${PHP_VERSION}-gmp"
ARG INSTALL_EXTS_PECL="php${PHP_VERSION}-pecl-apcu php${PHP_VERSION}-pecl-zip php${PHP_VERSION}-pecl-redis6"

RUN dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS $INSTALL_EXTS $INSTALL_EXTS_PECL && \
dnf reinstall -y tzdata && \
rpm -V $INSTALL_PKGS && \
php -v | grep -qe "v$PHP_VERSION\." && \
echo "Found VERSION $PHP_VERSION" && \
for ext in $(echo $INSTALL_EXTS | sed s/php${PHP_VERSION}-//g) ; do php -m | grep -qi "$ext"; done && \
for ext in $(echo $INSTALL_EXTS_PECL | sed s/php${PHP_VERSION}-pecl-//g | sed s/redis6/redis/g) ; do php -m | grep -qi "$ext"; done && \
echo "Found requested extensions" && \
dnf -y clean all --enablerepo='*'

ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
APP_DATA=${APP_ROOT}/src \
PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
PHP_SYSCONF_PATH=/etc \
PHP_HTTPD_CONF_FILE=php.conf \
PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
PHP_FPM_CONF_FILE=www.conf \
PHP_FPM_RUN_DIR=/run/php-fpm \
PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
PHP_FPM_LOG_PATH=/var/log/php-fpm \
HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
HTTPD_VAR_RUN=/var/run/httpd \
HTTPD_DATA_PATH=/var/www \
HTTPD_DATA_ORIG_PATH=/var/www \
HTTPD_VAR_PATH=/var

# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
COPY ./s2i/bin/ $STI_SCRIPTS_PATH

# Copy extra files to the image.
COPY ./root/ /

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

USER 1001

# Set the default CMD to print the usage of the language image
CMD $STI_SCRIPTS_PATH/usage
91 changes: 91 additions & 0 deletions 8.4/Dockerfile.c9s
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
FROM quay.io/sclorg/s2i-base-c9s:c9s

# This image provides an Apache+PHP environment for running PHP
# applications.

EXPOSE 8080
EXPOSE 8443

# Description
# This image provides an Apache 2.4 + PHP 8.4 environment for running PHP applications.
# Exposed ports:
# * 8080 - alternative port for http

ENV PHP_VERSION=8.4 \
PHP_VER_SHORT=84 \
NAME=php

ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
building and running various PHP $PHP_VERSION applications and frameworks. \
PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
to write dynamically generated web pages. PHP also offers built-in database integration \
for several commercial and non-commercial database management systems, so writing \
a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
is probably as a replacement for CGI scripts."

LABEL summary="${SUMMARY}" \
description="${DESCRIPTION}" \
io.k8s.description="${DESCRIPTION}" \
io.k8s.display-name="Apache 2.4 with PHP ${PHP_VERSION}" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,${NAME},${NAME}${PHP_VER_SHORT},${NAME}-${PHP_VER_SHORT}" \
io.openshift.s2i.scripts-url="image:///usr/libexec/s2i" \
io.s2i.scripts-url="image:///usr/libexec/s2i" \
name="sclorg/${NAME}-${PHP_VER_SHORT}-c9s" \
com.redhat.component="${NAME}-${PHP_VER_SHORT}-container" \
version="1" \
com.redhat.license_terms="https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" \
help="For more information visit https://github.com/sclorg/s2i-${NAME}-container" \
usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=${PHP_VERSION}/test/test-app sclorg/${NAME}-${PHP_VER_SHORT}-c9s sample-server" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"

# Install Apache httpd and PHP
ARG INSTALL_PKGS="php php-fpm mod_ssl hostname"
ARG INSTALL_EXTS="php-json php-mysqli php-pgsql php-bcmath \
php-gd php-intl php-ldap php-mbstring php-pdo \
php-process php-soap php-opcache php-xml \
php-gmp php-apcu php-zip php-redis"

RUN dnf module -y enable php:$PHP_VERSION && \
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS $INSTALL_EXTS && \
dnf reinstall -y tzdata && \
rpm -V $INSTALL_PKGS && \
php -v | grep -qe "v$PHP_VERSION\." && \
echo "Found VERSION $PHP_VERSION" && \
for ext in $(echo $INSTALL_EXTS | sed s/php-//g) ; do php -m | grep -qi "$ext\$"; done && \
echo "Found requested extensions" && \
dnf -y clean all --enablerepo='*'

ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
APP_DATA=${APP_ROOT}/src \
PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
PHP_SYSCONF_PATH=/etc \
PHP_HTTPD_CONF_FILE=php.conf \
PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
PHP_FPM_CONF_FILE=www.conf \
PHP_FPM_RUN_DIR=/run/php-fpm \
PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
PHP_FPM_LOG_PATH=/var/log/php-fpm \
HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
HTTPD_VAR_RUN=/var/run/httpd \
HTTPD_DATA_PATH=/var/www \
HTTPD_DATA_ORIG_PATH=/var/www \
HTTPD_VAR_PATH=/var

# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
COPY ./s2i/bin/ $STI_SCRIPTS_PATH

# Copy extra files to the image.
COPY ./root/ /

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

USER 1001

# Set the default CMD to print the usage of the language image
CMD $STI_SCRIPTS_PATH/usage
85 changes: 85 additions & 0 deletions 8.4/Dockerfile.fedora
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
FROM quay.io/fedora/s2i-base:43

# This image provides an Apache+PHP environment for running PHP
# applications.

EXPOSE 8080
EXPOSE 8443

ENV PHP_VERSION=8.4 \
PHP_SHORT_VER=84 \
PATH=$PATH:/usr/bin

ENV SUMMARY="Platform for building and running PHP $PHP_VERSION applications" \
DESCRIPTION="PHP $PHP_VERSION available as container is a base platform for \
building and running various PHP $PHP_VERSION applications and frameworks. \
PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers \
to write dynamically generated web pages. PHP also offers built-in database integration \
for several commercial and non-commercial database management systems, so writing \
a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding \
is probably as a replacement for CGI scripts."

ENV NAME=php \
VERSION=0 \
RELEASE=1 \
ARCH=x86_64

LABEL summary="$SUMMARY" \
description="$DESCRIPTION" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Apache 2.4 with PHP $PHP_VERSION" \
io.openshift.expose-services="8080:http" \
io.openshift.tags="builder,php" \
name="fedora/$NAME-$PHP_SHORT_VER" \
com.redhat.component="$NAME" \
version="$VERSION" \
usage="s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=/$PHP_VERSION/test/test-app quay.io/fedora/$NAME-$PHP_SHORT_VER sample-server" \
maintainer="SoftwareCollections.org <sclorg@redhat.com>"

# Install Apache httpd and PHP
ARG INSTALL_PKGS="php php-fpm mod_ssl hostname"
ARG INSTALL_EXTS="php-json php-mysqli php-pgsql php-bcmath \
php-gd php-intl php-ldap php-mbstring php-pdo \
php-process php-soap php-opcache php-xml \
php-gmp php-apcu php-zip php-redis"

RUN dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS $INSTALL_EXTS --nogpgcheck && \
rpm -V $INSTALL_PKGS && \
php -v | grep -qe "v$PHP_VERSION\." && \
echo "Found VERSION $PHP_VERSION" && \
for ext in $(echo $INSTALL_EXTS | sed s/php-//g) ; do php -m | grep -qi "$ext\$"; done && \
echo "Found requested extensions" && \
dnf -y clean all --enablerepo='*'

ENV PHP_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/php/ \
APP_DATA=${APP_ROOT}/src \
PHP_DEFAULT_INCLUDE_PATH=/usr/share/pear \
PHP_SYSCONF_PATH=/etc \
PHP_HTTPD_CONF_FILE=php.conf \
PHP_FPM_CONF_D_PATH=/etc/php-fpm.d \
PHP_FPM_CONF_FILE=www.conf \
PHP_FPM_RUN_DIR=/run/php-fpm \
PHP_MAIN_FPM_CONF_FILE=/etc/php-fpm.conf \
PHP_FPM_LOG_PATH=/var/log/php-fpm \
HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/conf.d \
HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
HTTPD_MODULES_CONF_D_PATH=/etc/httpd/conf.modules.d \
HTTPD_VAR_RUN=/var/run/httpd \
HTTPD_DATA_PATH=/var/www \
HTTPD_DATA_ORIG_PATH=/var/www \
HTTPD_VAR_PATH=/var

# Copy the S2I scripts from the specific language image to $STI_SCRIPTS_PATH
COPY ./s2i/bin/ $STI_SCRIPTS_PATH

# Copy extra files to the image.
COPY ./root/ /

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

USER 1001

# Set the default CMD to print the usage of the language image
CMD $STI_SCRIPTS_PATH/usage
Loading