-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #497 from SUSE/for-deploy-Tumbleweed
🤖: Update build recipes for Tumbleweed
- Loading branch information
Showing
25 changed files
with
298 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# SPDX-License-Identifier: MIT | ||
#!BuildTag: opensuse/bci/php-apache:8 | ||
#!BuildTag: opensuse/bci/php-apache:8-%RELEASE% | ||
|
||
FROM opensuse/tumbleweed:latest | ||
|
||
MAINTAINER openSUSE (https://www.opensuse.org/) | ||
|
||
# Define labels according to https://en.opensuse.org/Building_derived_containers | ||
# labelprefix=org.opensuse.bci.php-apache | ||
LABEL org.opencontainers.image.title="openSUSE Tumbleweed BCI PHP-Apache 8" | ||
LABEL org.opencontainers.image.description="PHP-Apache 8 container based on the openSUSE Tumbleweed Base Container Image." | ||
LABEL org.opencontainers.image.version="8" | ||
LABEL org.opencontainers.image.url="https://www.opensuse.org" | ||
LABEL org.opencontainers.image.created="%BUILDTIME%" | ||
LABEL org.opencontainers.image.vendor="openSUSE Project" | ||
LABEL org.opencontainers.image.source="%SOURCEURL%" | ||
LABEL org.opensuse.reference="registry.opensuse.org/opensuse/bci/php-apache:8-%RELEASE%" | ||
LABEL org.openbuildservice.disturl="%DISTURL%" | ||
LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime" | ||
LABEL org.opensuse.release-stage="released" | ||
|
||
# endlabelprefix | ||
|
||
RUN set -euo pipefail; zypper -n in php8 php8-cli php-composer2 php8-curl php8-zip php8-zlib php8-phar php8-mbstring apache2-mod_php8; zypper -n clean; rm -rf /var/log/* | ||
ENV PHP_VERSION="%%php_version%%" | ||
ENV PHP_INI_DIR="/etc/php8/" | ||
ENV PHPIZE_DEPS="php8-devel awk make" | ||
ENV COMPOSER_VERSION="%%composer_version%%" | ||
ENV APACHE_CONFDIR="/etc/apache2" | ||
ENV APACHE_ENVVARS="/usr/sbin/envvars" | ||
|
||
ENTRYPOINT ["docker-php-entrypoint"] | ||
CMD ["apache2-foreground"] | ||
COPY docker-php-source docker-php-entrypoint docker-php-ext-configure docker-php-ext-enable docker-php-ext-install /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/docker-php-* | ||
|
||
STOPSIGNAL SIGWINCH | ||
|
||
# create our own apache2-foreground from the systemd startup script | ||
RUN sed 's|^exec $apache_bin|exec $apache_bin -DFOREGROUND|' /usr/sbin/start_apache2 > /usr/local/bin/apache2-foreground | ||
RUN chmod +x /usr/local/bin/apache2-foreground | ||
|
||
# apache fails to start without its log folder | ||
RUN mkdir -p /var/log/apache2 | ||
|
||
WORKDIR /srv/www/htdocs | ||
|
||
EXPOSE 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<services> | ||
<service mode="buildtime" name="docker_label_helper"/> | ||
<service mode="buildtime" name="kiwi_metainfo_helper"/> | ||
<service name="replace_using_package_version" mode="buildtime"> | ||
<param name="file">Dockerfile</param> | ||
<param name="regex">%%composer_version%%</param> | ||
<param name="package">php-composer2</param> | ||
</service> | ||
<service name="replace_using_package_version" mode="buildtime"> | ||
<param name="file">Dockerfile</param> | ||
<param name="regex">%%php_version%%</param> | ||
<param name="package">php8</param> | ||
</service> | ||
</services> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# first arg is `-f` or `--some-option` | ||
if [ "${1#-}" != "$1" ]; then | ||
set -- apache2-foreground "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
echo "This script is not required in this PHP container." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
echo "This script is not required in this PHP container." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
extensions=() | ||
|
||
for ext in $@; do | ||
[[ "$ext" =~ ^- ]] || extensions+=("php8-$ext") | ||
done | ||
|
||
zypper -n in ${extensions[*]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
echo "This script is not required in this PHP container." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
------------------------------------------------------------------- | ||
Thu Jul 06 09:56:51 UTC 2023 - SUSE Update Bot <[email protected]> | ||
|
||
- First version of the PHP-Apache 8 BCI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# SPDX-License-Identifier: MIT | ||
#!BuildTag: opensuse/bci/php-fpm:8 | ||
#!BuildTag: opensuse/bci/php-fpm:8-%RELEASE% | ||
|
||
FROM opensuse/tumbleweed:latest | ||
|
||
MAINTAINER openSUSE (https://www.opensuse.org/) | ||
|
||
# Define labels according to https://en.opensuse.org/Building_derived_containers | ||
# labelprefix=org.opensuse.bci.php-fpm | ||
LABEL org.opencontainers.image.title="openSUSE Tumbleweed BCI PHP-FPM 8" | ||
LABEL org.opencontainers.image.description="PHP-FPM 8 container based on the openSUSE Tumbleweed Base Container Image." | ||
LABEL org.opencontainers.image.version="8" | ||
LABEL org.opencontainers.image.url="https://www.opensuse.org" | ||
LABEL org.opencontainers.image.created="%BUILDTIME%" | ||
LABEL org.opencontainers.image.vendor="openSUSE Project" | ||
LABEL org.opencontainers.image.source="%SOURCEURL%" | ||
LABEL org.opensuse.reference="registry.opensuse.org/opensuse/bci/php-fpm:8-%RELEASE%" | ||
LABEL org.openbuildservice.disturl="%DISTURL%" | ||
LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime" | ||
LABEL org.opensuse.release-stage="released" | ||
|
||
# endlabelprefix | ||
|
||
RUN set -euo pipefail; zypper -n in php8 php8-cli php-composer2 php8-curl php8-zip php8-zlib php8-phar php8-mbstring php8-fpm; zypper -n clean; rm -rf /var/log/* | ||
ENV PHP_VERSION="%%php_version%%" | ||
ENV PHP_INI_DIR="/etc/php8/" | ||
ENV PHPIZE_DEPS="php8-devel awk make" | ||
ENV COMPOSER_VERSION="%%composer_version%%" | ||
|
||
ENTRYPOINT ["docker-php-entrypoint"] | ||
CMD ["php-fpm"] | ||
COPY docker-php-source docker-php-entrypoint docker-php-ext-configure docker-php-ext-enable docker-php-ext-install /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/docker-php-* | ||
WORKDIR /srv/www/htdocs | ||
|
||
RUN set -euo pipefail; \ | ||
cd /etc/php8/fpm/; \ | ||
test -e php-fpm.d/www.conf.default && cp -p php-fpm.d/www.conf.default php-fpm.d/www.conf; \ | ||
test -e php-fpm.conf.default && cp -p php-fpm.conf.default php-fpm.conf; \ | ||
{ \ | ||
echo '[global]'; \ | ||
echo 'error_log = /proc/self/fd/2'; \ | ||
echo; echo '; https://github.com/docker-library/php/pull/725#issuecomment-443540114'; echo 'log_limit = 8192'; \ | ||
echo; \ | ||
echo '[www]'; \ | ||
echo '; if we send this to /proc/self/fd/1, it never appears'; \ | ||
echo 'access.log = /proc/self/fd/2'; \ | ||
echo; \ | ||
echo 'clear_env = no'; \ | ||
echo; \ | ||
echo '; Ensure worker stdout and stderr are sent to the main error log.'; \ | ||
echo 'catch_workers_output = yes'; \ | ||
echo 'decorate_workers_output = no'; \ | ||
} | tee php-fpm.d/docker.conf; \ | ||
{ \ | ||
echo '[global]'; \ | ||
echo 'daemonize = no'; \ | ||
} | tee php-fpm.d/zz-docker.conf | ||
|
||
# Override stop signal to stop process gracefully | ||
# https://github.com/php/php-src/blob/17baa87faddc2550def3ae7314236826bc1b1398/sapi/fpm/php-fpm.8.in#L163 | ||
STOPSIGNAL SIGQUIT | ||
|
||
EXPOSE 9000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<services> | ||
<service mode="buildtime" name="docker_label_helper"/> | ||
<service mode="buildtime" name="kiwi_metainfo_helper"/> | ||
<service name="replace_using_package_version" mode="buildtime"> | ||
<param name="file">Dockerfile</param> | ||
<param name="regex">%%composer_version%%</param> | ||
<param name="package">php-composer2</param> | ||
</service> | ||
<service name="replace_using_package_version" mode="buildtime"> | ||
<param name="file">Dockerfile</param> | ||
<param name="regex">%%php_version%%</param> | ||
<param name="package">php8</param> | ||
</service> | ||
</services> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# first arg is `-f` or `--some-option` | ||
if [ "${1#-}" != "$1" ]; then | ||
set -- php-fpm "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
echo "This script is not required in this PHP container." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
echo "This script is not required in this PHP container." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
extensions=() | ||
|
||
for ext in $@; do | ||
[[ "$ext" =~ ^- ]] || extensions+=("php8-$ext") | ||
done | ||
|
||
zypper -n in ${extensions[*]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
echo "This script is not required in this PHP container." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
------------------------------------------------------------------- | ||
Thu Jul 06 09:56:51 UTC 2023 - SUSE Update Bot <[email protected]> | ||
|
||
- First version of the PHP-FPM 8 BCI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# SPDX-License-Identifier: MIT | ||
#!BuildTag: opensuse/bci/php:8 | ||
#!BuildTag: opensuse/bci/php:8-%RELEASE% | ||
|
||
FROM opensuse/tumbleweed:latest | ||
|
||
MAINTAINER openSUSE (https://www.opensuse.org/) | ||
|
||
# Define labels according to https://en.opensuse.org/Building_derived_containers | ||
# labelprefix=org.opensuse.bci.php | ||
LABEL org.opencontainers.image.title="openSUSE Tumbleweed BCI PHP 8" | ||
LABEL org.opencontainers.image.description="PHP 8 container based on the openSUSE Tumbleweed Base Container Image." | ||
LABEL org.opencontainers.image.version="8" | ||
LABEL org.opencontainers.image.url="https://www.opensuse.org" | ||
LABEL org.opencontainers.image.created="%BUILDTIME%" | ||
LABEL org.opencontainers.image.vendor="openSUSE Project" | ||
LABEL org.opencontainers.image.source="%SOURCEURL%" | ||
LABEL org.opensuse.reference="registry.opensuse.org/opensuse/bci/php:8-%RELEASE%" | ||
LABEL org.openbuildservice.disturl="%DISTURL%" | ||
LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime" | ||
LABEL org.opensuse.release-stage="released" | ||
|
||
# endlabelprefix | ||
|
||
RUN set -euo pipefail; zypper -n in php8 php8-cli php-composer2 php8-curl php8-zip php8-zlib php8-phar php8-mbstring; zypper -n clean; rm -rf /var/log/* | ||
ENV PHP_VERSION="%%php_version%%" | ||
ENV PHP_INI_DIR="/etc/php8/" | ||
ENV PHPIZE_DEPS="php8-devel awk make" | ||
ENV COMPOSER_VERSION="%%composer_version%%" | ||
|
||
ENTRYPOINT ["docker-php-entrypoint"] | ||
CMD ["php", "-a"] | ||
COPY docker-php-source docker-php-entrypoint docker-php-ext-configure docker-php-ext-enable docker-php-ext-install /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/docker-php-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<services> | ||
<service mode="buildtime" name="docker_label_helper"/> | ||
<service mode="buildtime" name="kiwi_metainfo_helper"/> | ||
<service name="replace_using_package_version" mode="buildtime"> | ||
<param name="file">Dockerfile</param> | ||
<param name="regex">%%composer_version%%</param> | ||
<param name="package">php-composer2</param> | ||
</service> | ||
<service name="replace_using_package_version" mode="buildtime"> | ||
<param name="file">Dockerfile</param> | ||
<param name="regex">%%php_version%%</param> | ||
<param name="package">php8</param> | ||
</service> | ||
</services> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# first arg is `-f` or `--some-option` | ||
if [ "${1#-}" != "$1" ]; then | ||
set -- php "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
echo "This script is not required in this PHP container." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
echo "This script is not required in this PHP container." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
extensions=() | ||
|
||
for ext in $@; do | ||
[[ "$ext" =~ ^- ]] || extensions+=("php8-$ext") | ||
done | ||
|
||
zypper -n in ${extensions[*]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
echo "This script is not required in this PHP container." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
------------------------------------------------------------------- | ||
Thu Jul 06 09:56:51 UTC 2023 - SUSE Update Bot <[email protected]> | ||
|
||
- First version of the PHP 8 BCI |