[info=346ceb718bab06b4c190b0e82763a63b]

OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/php-fpm8-image?expand=0&rev=1
This commit is contained in:
Dan Čermák 2023-07-06 10:40:09 +00:00 committed by Git OBS Bridge
commit 7976965bb9
10 changed files with 132 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

65
Dockerfile Normal file
View File

@ -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

14
_service Normal file
View File

@ -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>

9
docker-php-entrypoint Normal file
View File

@ -0,0 +1,9 @@
#!/bin/sh
set -e
# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- php-fpm "$@"
fi
exec "$@"

2
docker-php-ext-configure Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
echo "This script is not required in this PHP container."

2
docker-php-ext-enable Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
echo "This script is not required in this PHP container."

10
docker-php-ext-install Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
set -euo pipefail
extensions=()
for ext in $@; do
[[ "$ext" =~ ^- ]] || extensions+=("php8-$ext")
done
zypper -n in ${extensions[*]}

2
docker-php-source Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
echo "This script is not required in this PHP container."

4
php-fpm8-image.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Thu Jul 06 09:56:51 UTC 2023 - SUSE Update Bot <bci-internal@suse.de>
- First version of the PHP-FPM 8 BCI