diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index c01ca7b..e4b19b6 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -27,8 +27,18 @@ jobs: include: - directory: ./ubuntu-22.04/ tagging: 8.1-fpm + - directory: ./ubuntu-24.04/ + tagging: 8.3-fpm + - directory: ./ubuntu-22.04-sury-8.1/ + tagging: 8.1-fpm-ubuntu22.04-sury - directory: ./ubuntu-22.04-sury-8.2/ tagging: 8.2-fpm-ubuntu22.04-sury + - directory: ./ubuntu-22.04-sury-8.3/ + tagging: 8.3-fpm-ubuntu22.04-sury + - directory: ./ubuntu-24.04-sury-8.2/ + tagging: 8.2-fpm-ubuntu24.04-sury + - directory: ./ubuntu-24.04-sury-8.3/ + tagging: 8.3-fpm-ubuntu24.04-sury permissions: contents: read packages: write diff --git a/README.md b/README.md index 807fcf3..2ff1bf8 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,24 @@ This is a minimalistic php-fpm Docker image based on the official Ubuntu images. The image provides different PHP versions as seen below. -## Supported tags +## Supported PHP versions + +### Current versions + + +* 8.3-fpm-ubuntu24.04-sury-n - PHP 8.3 from deb.sury.org [PPA](https://launchpad.net/~ondrej/+archive/ubuntu/php/) based on Ubuntu 24.04 LTS +* 8.2-fpm-ubuntu24.04-sury-n - PHP 8.2 from deb.sury.org [PPA](https://launchpad.net/~ondrej/+archive/ubuntu/php/) based on Ubuntu 24.04 LTS * 8.3-fpm-ubuntu22.04-sury-n - PHP 8.3 from deb.sury.org [PPA](https://launchpad.net/~ondrej/+archive/ubuntu/php/) based on Ubuntu 22.04 LTS * 8.2-fpm-ubuntu22.04-sury-n - PHP 8.2 from deb.sury.org [PPA](https://launchpad.net/~ondrej/+archive/ubuntu/php/) based on Ubuntu 22.04 LTS * 8.1-fpm-ubuntu22.04-sury-n - PHP 8.1 from deb.sury.org [PPA](https://launchpad.net/~ondrej/+archive/ubuntu/php/) based on Ubuntu 22.04 LTS -* 8.1-fpm-n, **latest** - PHP 8.1 included in the current Ubuntu 22.04 LTS distribution. This is the **main** branch as known before. + +* 8.3-fpm-n, PHP 8.3 included in the current Ubuntu 24.04 LTS distribution. +* 8.1-fpm-n, **latest** - PHP 8.1 included in Ubuntu 22.04 LTS distribution. This is the **main** branch as known before. Due to the new build scheme the **latest** tag is still connected with this version. This will be changed soon. + +### Older / deprecated versions + + * 8.0-fpm-ubuntu22.04-sury-n - PHP 8.0 from deb.sury.org [PPA](https://launchpad.net/~ondrej/+archive/ubuntu/php/) based on Ubuntu 22.04 LTS * 7.4-fpm-ubuntu22.04-sury-n - PHP 7.4 from deb.sury.org [PPA](https://launchpad.net/~ondrej/+archive/ubuntu/php/) based on Ubuntu 22.04 LTS * 7.4-fpm-n - PHP 7.4 included in the Ubuntu 20.04 LTS distribution diff --git a/build.sh b/build.sh index 721873a..782c84a 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,7 @@ #!/bin/bash - +# +# Build all PHP images locally +# # Load image mappings and central image name from external file source ./image_mappings.sh diff --git a/image_mappings.sh b/image_mappings.sh index c537a9c..23fc973 100644 --- a/image_mappings.sh +++ b/image_mappings.sh @@ -4,6 +4,12 @@ IMAGE_NAME="geschke/php-fpm-swrm" # Define an associative array that maps directory names to image tags declare -A images=( ["ubuntu-22.04"]="8.1-fpm" + ["ubuntu-24.04"]="8.3-fpm" + ["ubuntu-22.04-sury-8.1"]="8.1-fpm-ubuntu22.04-sury" ["ubuntu-22.04-sury-8.2"]="8.2-fpm-ubuntu22.04-sury" + ["ubuntu-22.04-sury-8.3"]="8.3-fpm-ubuntu22.04-sury" + ["ubuntu-24.04-sury-8.2"]="8.2-fpm-ubuntu24.04-sury" + ["ubuntu-24.04-sury-8.3"]="8.3-fpm-ubuntu24.04-sury" + ["ubuntu-24.04-sury-8.4"]="8.4-fpm-ubuntu24.04-sury" ) diff --git a/ubuntu-22.04-sury-8.1/Dockerfile b/ubuntu-22.04-sury-8.1/Dockerfile new file mode 100644 index 0000000..8eb8385 --- /dev/null +++ b/ubuntu-22.04-sury-8.1/Dockerfile @@ -0,0 +1,72 @@ +FROM ubuntu:jammy-20240911.1 + +LABEL maintainer="Ralf Geschke <ralf@kuerbis.org>" + +LABEL last_changed="2024-09-27" + +# necessary to set default timezone Etc/UTC +ENV DEBIAN_FRONTEND=noninteractive + +# Install PHP 8.1 with some libraries from sury PPA +RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get -y dist-upgrade \ + && apt-get install -y ca-certificates \ + && apt-get install -y --no-install-recommends \ + && apt-get install -y locales software-properties-common \ + && add-apt-repository -y ppa:ondrej/php \ + && apt-get update \ + && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ + && apt-get install -y git ssmtp wget \ + && apt-get install -y php8.1-fpm \ + php8.1-curl php8.1-mysql php8.1-intl \ + php8.1-mbstring php8.1-bz2 php8.1-pgsql php8.1-xml php8.1-xsl php8.1-sqlite3 \ + php8.1-opcache php8.1-zip php8.1-gd php8.1-redis php8.1-memcache php8.1-memcached \ + php8.1-mongodb php8.1-mcrypt php8.1-bcmath php8.1-protobuf php8.1-imagick \ + && apt-get -y upgrade \ + && rm -rf /var/lib/apt/lists/* + + #\ +# && cp /usr/share/zoneinfo/Etc/UTC /etc/localtime +# php-recode + +ENV LANG=en_US.utf8 + +# Install composer +COPY install-composer.sh /tmp +RUN cd /tmp/ \ + && sh install-composer.sh \ + && mv /tmp/composer.phar /usr/local/bin/composer \ + && rm install-composer.sh + +# taken from official Docker PHP image +RUN set -ex \ + && cd /etc/php/8.1/fpm \ + && mkdir /run/php \ + && { \ + echo '[global]'; \ + echo 'error_log = /proc/self/fd/2'; \ + 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'; \ + } | tee pool.d/docker.conf \ + && { \ + echo '[global]'; \ + echo 'daemonize = no'; \ + echo; \ + echo '[www]'; \ + echo 'listen = [::]:9000'; \ + } | tee pool.d/zz-docker.conf + + +WORKDIR /usr/share/nginx/html + +EXPOSE 9000 + +CMD ["php-fpm8.1"] diff --git a/ubuntu-22.04-sury-8.1/version.txt b/ubuntu-22.04-sury-8.1/version.txt new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/ubuntu-22.04-sury-8.1/version.txt @@ -0,0 +1 @@ +3 diff --git a/ubuntu-22.04-sury-8.3/Dockerfile b/ubuntu-22.04-sury-8.3/Dockerfile new file mode 100644 index 0000000..62ef71b --- /dev/null +++ b/ubuntu-22.04-sury-8.3/Dockerfile @@ -0,0 +1,72 @@ +FROM ubuntu:jammy-20240911.1 + +LABEL maintainer="Ralf Geschke <ralf@kuerbis.org>" + +LABEL last_changed="2024-09-27" + +# necessary to set default timezone Etc/UTC +ENV DEBIAN_FRONTEND=noninteractive + +# Install PHP 8.3 with some libraries from sury PPA +RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get -y dist-upgrade \ + && apt-get install -y ca-certificates \ + && apt-get install -y --no-install-recommends \ + && apt-get install -y locales software-properties-common \ + && add-apt-repository -y ppa:ondrej/php \ + && apt-get update \ + && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ + && apt-get install -y git ssmtp wget \ + && apt-get install -y php8.3-fpm \ + php8.3-curl php8.3-mysql php8.3-intl \ + php8.3-mbstring php8.3-bz2 php8.3-pgsql php8.3-xml php8.3-xsl php8.3-sqlite3 \ + php8.3-opcache php8.3-zip php8.3-gd php8.3-redis php8.3-memcache php8.3-memcached \ + php8.3-mongodb php8.3-mcrypt php8.3-bcmath php8.3-protobuf php8.3-imagick \ + && apt-get -y upgrade \ + && rm -rf /var/lib/apt/lists/* + + #\ +# && cp /usr/share/zoneinfo/Etc/UTC /etc/localtime +# php-recode + +ENV LANG=en_US.utf8 + +# Install composer +COPY install-composer.sh /tmp +RUN cd /tmp/ \ + && sh install-composer.sh \ + && mv /tmp/composer.phar /usr/local/bin/composer \ + && rm install-composer.sh + +# taken from official Docker PHP image +RUN set -ex \ + && cd /etc/php/8.3/fpm \ + && mkdir /run/php \ + && { \ + echo '[global]'; \ + echo 'error_log = /proc/self/fd/2'; \ + 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'; \ + } | tee pool.d/docker.conf \ + && { \ + echo '[global]'; \ + echo 'daemonize = no'; \ + echo; \ + echo '[www]'; \ + echo 'listen = [::]:9000'; \ + } | tee pool.d/zz-docker.conf + + +WORKDIR /usr/share/nginx/html + +EXPOSE 9000 + +CMD ["php-fpm8.3"] diff --git a/ubuntu-22.04-sury-8.3/version.txt b/ubuntu-22.04-sury-8.3/version.txt new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/ubuntu-22.04-sury-8.3/version.txt @@ -0,0 +1 @@ +4 diff --git a/ubuntu-24.04-sury-8.2/Dockerfile b/ubuntu-24.04-sury-8.2/Dockerfile new file mode 100644 index 0000000..4d02f34 --- /dev/null +++ b/ubuntu-24.04-sury-8.2/Dockerfile @@ -0,0 +1,72 @@ +FROM ubuntu:noble-20240827.1 + +LABEL maintainer="Ralf Geschke <ralf@kuerbis.org>" + +LABEL last_changed="2024-10-01" + +# necessary to set default timezone Etc/UTC +ENV DEBIAN_FRONTEND=noninteractive + +# Install PHP 8.3 with some libraries from sury PPA +RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get -y dist-upgrade \ + && apt-get install -y ca-certificates \ + && apt-get install -y --no-install-recommends \ + && apt-get install -y locales software-properties-common \ + && add-apt-repository -y ppa:ondrej/php \ + && apt-get update \ + && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ + && apt-get install -y git ssmtp wget \ + && apt-get install -y php8.3-fpm \ + php8.3-curl php8.3-mysql php8.3-intl \ + php8.3-mbstring php8.3-bz2 php8.3-pgsql php8.3-xml php8.3-xsl php8.3-sqlite3 \ + php8.3-opcache php8.3-zip php8.3-gd php8.3-redis php8.3-memcache php8.3-memcached \ + php8.3-mongodb php8.3-mcrypt php8.3-bcmath php8.3-protobuf php8.3-imagick \ + && apt-get -y upgrade \ + && rm -rf /var/lib/apt/lists/* + + #\ +# && cp /usr/share/zoneinfo/Etc/UTC /etc/localtime +# php-recode + +ENV LANG=en_US.utf8 + +# Install composer +COPY install-composer.sh /tmp +RUN cd /tmp/ \ + && sh install-composer.sh \ + && mv /tmp/composer.phar /usr/local/bin/composer \ + && rm install-composer.sh + +# taken from official Docker PHP image +RUN set -ex \ + && cd /etc/php/8.3/fpm \ + && mkdir -p /run/php \ + && { \ + echo '[global]'; \ + echo 'error_log = /proc/self/fd/2'; \ + 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'; \ + } | tee pool.d/docker.conf \ + && { \ + echo '[global]'; \ + echo 'daemonize = no'; \ + echo; \ + echo '[www]'; \ + echo 'listen = [::]:9000'; \ + } | tee pool.d/zz-docker.conf + + +WORKDIR /usr/share/nginx/html + +EXPOSE 9000 + +CMD ["php-fpm8.3"] diff --git a/ubuntu-24.04-sury-8.2/version.txt b/ubuntu-24.04-sury-8.2/version.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/ubuntu-24.04-sury-8.2/version.txt @@ -0,0 +1 @@ +1 diff --git a/ubuntu-24.04-sury-8.3/Dockerfile b/ubuntu-24.04-sury-8.3/Dockerfile new file mode 100644 index 0000000..2d38dff --- /dev/null +++ b/ubuntu-24.04-sury-8.3/Dockerfile @@ -0,0 +1,72 @@ +FROM ubuntu:noble-20240827.1 + +LABEL maintainer="Ralf Geschke <ralf@kuerbis.org>" + +LABEL last_changed="2024-10-01" + +# necessary to set default timezone Etc/UTC +ENV DEBIAN_FRONTEND=noninteractive + +# Install PHP 8.2 with some libraries from sury PPA +RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get -y dist-upgrade \ + && apt-get install -y ca-certificates \ + && apt-get install -y --no-install-recommends \ + && apt-get install -y locales software-properties-common \ + && add-apt-repository -y ppa:ondrej/php \ + && apt-get update \ + && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ + && apt-get install -y git ssmtp wget \ + && apt-get install -y php8.2-fpm \ + php8.2-curl php8.2-mysql php8.2-intl \ + php8.2-mbstring php8.2-bz2 php8.2-pgsql php8.2-xml php8.2-xsl php8.2-sqlite3 \ + php8.2-opcache php8.2-zip php8.2-gd php8.2-redis php8.2-memcache php8.2-memcached \ + php8.2-mongodb php8.2-mcrypt php8.2-bcmath php8.2-protobuf php8.2-imagick \ + && apt-get -y upgrade \ + && rm -rf /var/lib/apt/lists/* + + #\ +# && cp /usr/share/zoneinfo/Etc/UTC /etc/localtime +# php-recode + +ENV LANG=en_US.utf8 + +# Install composer +COPY install-composer.sh /tmp +RUN cd /tmp/ \ + && sh install-composer.sh \ + && mv /tmp/composer.phar /usr/local/bin/composer \ + && rm install-composer.sh + +# taken from official Docker PHP image +RUN set -ex \ + && cd /etc/php/8.2/fpm \ + && mkdir -p /run/php \ + && { \ + echo '[global]'; \ + echo 'error_log = /proc/self/fd/2'; \ + 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'; \ + } | tee pool.d/docker.conf \ + && { \ + echo '[global]'; \ + echo 'daemonize = no'; \ + echo; \ + echo '[www]'; \ + echo 'listen = [::]:9000'; \ + } | tee pool.d/zz-docker.conf + + +WORKDIR /usr/share/nginx/html + +EXPOSE 9000 + +CMD ["php-fpm8.2"] diff --git a/ubuntu-24.04-sury-8.3/version.txt b/ubuntu-24.04-sury-8.3/version.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/ubuntu-24.04-sury-8.3/version.txt @@ -0,0 +1 @@ +1 diff --git a/ubuntu-24.04-sury-8.4/Dockerfile b/ubuntu-24.04-sury-8.4/Dockerfile new file mode 100644 index 0000000..12f7002 --- /dev/null +++ b/ubuntu-24.04-sury-8.4/Dockerfile @@ -0,0 +1,74 @@ +FROM ubuntu:noble-20240827.1 + +LABEL maintainer="Ralf Geschke <ralf@kuerbis.org>" + +LABEL last_changed="2024-10-01" + +# necessary to set default timezone Etc/UTC +ENV DEBIAN_FRONTEND=noninteractive + +# Install PHP 8.4 with some libraries from sury PPA +RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get -y dist-upgrade \ + && apt-get install -y ca-certificates \ + && apt-get install -y --no-install-recommends \ + && apt-get install -y locales software-properties-common \ + && add-apt-repository -y ppa:ondrej/php \ + && apt-get update \ + && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ + && apt-get install -y git ssmtp wget \ + && apt-get install -y php8.4-fpm \ + php8.4-curl php8.4-mysql php8.4-intl \ + php8.4-mbstring php8.4-bz2 php8.4-pgsql php8.4-xml php8.4-xsl php8.4-sqlite3 \ + php8.4-opcache php8.4-zip php8.4-gd php8.4-mongodb php8.4-mcrypt php8.4-bcmath php-predis \ + && apt-get -y upgrade \ + && rm -rf /var/lib/apt/lists/* + +# currently not available: +# php8.4-protobuf, php8.4-imagick, php8.4-redis, php8.4-memcache, php8.4-memcached + + #\ +# && cp /usr/share/zoneinfo/Etc/UTC /etc/localtime +# php-recode + +ENV LANG=en_US.utf8 + +# Install composer +COPY install-composer.sh /tmp +RUN cd /tmp/ \ + && sh install-composer.sh \ + && mv /tmp/composer.phar /usr/local/bin/composer \ + && rm install-composer.sh + +# taken from official Docker PHP image +RUN set -ex \ + && cd /etc/php/8.4/fpm \ + && mkdir -p /run/php \ + && { \ + echo '[global]'; \ + echo 'error_log = /proc/self/fd/2'; \ + 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'; \ + } | tee pool.d/docker.conf \ + && { \ + echo '[global]'; \ + echo 'daemonize = no'; \ + echo; \ + echo '[www]'; \ + echo 'listen = [::]:9000'; \ + } | tee pool.d/zz-docker.conf + + +WORKDIR /usr/share/nginx/html + +EXPOSE 9000 + +CMD ["php-fpm8.4"] diff --git a/ubuntu-24.04-sury-8.4/version.txt b/ubuntu-24.04-sury-8.4/version.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/ubuntu-24.04-sury-8.4/version.txt @@ -0,0 +1 @@ +1 diff --git a/ubuntu-24.04/Dockerfile b/ubuntu-24.04/Dockerfile new file mode 100644 index 0000000..f8a2678 --- /dev/null +++ b/ubuntu-24.04/Dockerfile @@ -0,0 +1,66 @@ +FROM ubuntu:noble-20240827.1 + +LABEL maintainer="Ralf Geschke <ralf@kuerbis.org>" + +LABEL last_changed="2024-10-01" + +# necessary to set default timezone Etc/UTC +ENV DEBIAN_FRONTEND=noninteractive + +# Install PHP 8.3 with some libraries +RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get -y dist-upgrade \ + && apt-get install -y ca-certificates \ + && apt-get install -y --no-install-recommends \ + && apt-get install -y locales \ + && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ + && apt-get install -y git ssmtp wget php-fpm \ + php-mysql php-curl php-intl \ + php-mbstring php-bz2 php-pgsql php-xml php-xsl php-sqlite3 \ + php-opcache php-zip php-gd php-redis php-memcache php-zip \ + php-json php-intl \ + && rm -rf /var/lib/apt/lists/* +# && cp /usr/share/zoneinfo/Etc/UTC /etc/localtime +# php-recode + +ENV LANG=en_US.utf8 + +# Install composer +COPY install-composer.sh /tmp +RUN cd /tmp/ \ + && sh install-composer.sh \ + && mv /tmp/composer.phar /usr/local/bin/composer \ + && rm install-composer.sh + +# taken from official Docker PHP image +RUN set -ex \ + && cd /etc/php/8.3/fpm \ + #&& mkdir /run/php \ + && { \ + echo '[global]'; \ + echo 'error_log = /proc/self/fd/2'; \ + 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'; \ + } | tee pool.d/docker.conf \ + && { \ + echo '[global]'; \ + echo 'daemonize = no'; \ + echo; \ + echo '[www]'; \ + echo 'listen = [::]:9000'; \ + } | tee pool.d/zz-docker.conf + + +WORKDIR /usr/share/nginx/html + +EXPOSE 9000 + +CMD ["php-fpm8.3"] diff --git a/ubuntu-24.04/version.txt b/ubuntu-24.04/version.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/ubuntu-24.04/version.txt @@ -0,0 +1 @@ +1