From d868e5a78c19495d80c664c9fa05fd63dac1979b Mon Sep 17 00:00:00 2001 From: Ralf Geschke Date: Thu, 3 Oct 2024 13:51:43 +0200 Subject: [PATCH] update to current Ubuntu 24.04 Docker image, switch latest tag to base 24.04, add update section in README.md --- .github/workflows/docker-publish.yml | 25 ++++++++++++++++++++++--- README.md | 14 ++++++++++++-- ubuntu-24.04-sury-8.2/Dockerfile | 4 ++-- ubuntu-24.04-sury-8.2/version.txt | 2 +- ubuntu-24.04-sury-8.3/Dockerfile | 20 ++++++++++---------- ubuntu-24.04-sury-8.3/version.txt | 2 +- ubuntu-24.04-sury-8.4/Dockerfile | 4 ++-- ubuntu-24.04-sury-8.4/version.txt | 2 +- ubuntu-24.04/Dockerfile | 4 ++-- ubuntu-24.04/version.txt | 2 +- 10 files changed, 54 insertions(+), 25 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index e4b19b6..3f4c4a9 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -27,18 +27,25 @@ jobs: include: - directory: ./ubuntu-22.04/ tagging: 8.1-fpm + latest: false - directory: ./ubuntu-24.04/ tagging: 8.3-fpm + latest: true - directory: ./ubuntu-22.04-sury-8.1/ tagging: 8.1-fpm-ubuntu22.04-sury + latest: false - directory: ./ubuntu-22.04-sury-8.2/ tagging: 8.2-fpm-ubuntu22.04-sury + latest: false - directory: ./ubuntu-22.04-sury-8.3/ tagging: 8.3-fpm-ubuntu22.04-sury + latest: false - directory: ./ubuntu-24.04-sury-8.2/ tagging: 8.2-fpm-ubuntu24.04-sury + latest: false - directory: ./ubuntu-24.04-sury-8.3/ tagging: 8.3-fpm-ubuntu24.04-sury + latest: false permissions: contents: read packages: write @@ -87,6 +94,7 @@ jobs: fi - name: Query existing Docker image tags + if: github.event_name != 'pull_request' id: query_tag run: | echo "full tag built in previous step:" @@ -101,13 +109,13 @@ jobs: fi - name: Test build image - if: "${{ steps.query_tag.outputs.run_build == 'true' }}" + if: "${{ steps.query_tag.outputs.run_build == 'true' && steps.generate_tag.outputs.full_tag != '' }}" run: | echo "build docker image ${{ matrix.directory }} ${{ env.IMAGE_NAME }} here... with tag ${{ steps.generate_tag.outputs.full_tag }} " - name: Build and push - if: "${{ steps.query_tag.outputs.run_build == 'true' }}" + if: "${{ steps.query_tag.outputs.run_build == 'true' && steps.generate_tag.outputs.full_tag != '' }}" uses: docker/build-push-action@v6 with: context: . @@ -115,4 +123,15 @@ jobs: push: true tags: | ${{ env.IMAGE_NAME }}:${{ steps.generate_tag.outputs.full_tag }} - ${{ env.REGISTRY_GITHUB }}/${{ env.IMAGE_NAME }}:${{ steps.generate_tag.outputs.full_tag }} + ${{ env.REGISTRY_GITHUB }}/${{ env.IMAGE_NAME }}:${{ steps.generate_tag.outputs.full_tag }} + + - name: Tag as latest if applicable + if: "${{ matrix.latest == 'true' && steps.query_tag.outputs.run_build == 'true' }}" + uses: docker/build-push-action@v6 + with: + context: ./${{ matrix.directory }} + file: ${{ matrix.directory }}/Dockerfile + push: true + tags: | + ${{ env.IMAGE_NAME }}:latest + ${{ env.REGISTRY_GITHUB }}/${{ env.IMAGE_NAME }}:latest diff --git a/README.md b/README.md index 2ff1bf8..8f982c9 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,16 @@ This is a minimalistic php-fpm Docker image based on the official Ubuntu images. The image provides different PHP versions as seen below. +## Update (October 3, 2024) + +### New Build Schema + +The build schema has been updated for better efficiency, flexibility, and speed. Git tags are no longer used to version Docker images, and they are now deprecated. All future images will follow the new tagging structure. The legacy Git-tagged images are no longer maintained or considered in the build process. + +### Latest Image Update + +The `latest` Docker image has shifted from the previous `ubuntu22.04` base (tagged `8.1-fpm-n`) to the new `ubuntu24.04` base, now tagged as `8.3-fpm-n`. Please update your workflows accordingly if you rely on the `latest` tag. + ## Supported PHP versions ### Current versions @@ -15,8 +25,8 @@ The image provides different PHP versions as seen below. * 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.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. +* 8.3-fpm-n, **latest** - PHP 8.3 included in the current Ubuntu 24.04 LTS distribution. The **latest** tag has switched to this version on 2024-10-03. +* 8.1-fpm-n - PHP 8.1 included in Ubuntu 22.04 LTS distribution. ### Older / deprecated versions diff --git a/ubuntu-24.04-sury-8.2/Dockerfile b/ubuntu-24.04-sury-8.2/Dockerfile index 4d02f34..3d43656 100644 --- a/ubuntu-24.04-sury-8.2/Dockerfile +++ b/ubuntu-24.04-sury-8.2/Dockerfile @@ -1,8 +1,8 @@ -FROM ubuntu:noble-20240827.1 +FROM ubuntu:noble-20240904.1 LABEL maintainer="Ralf Geschke " -LABEL last_changed="2024-10-01" +LABEL last_changed="2024-10-03" # necessary to set default timezone Etc/UTC ENV DEBIAN_FRONTEND=noninteractive diff --git a/ubuntu-24.04-sury-8.2/version.txt b/ubuntu-24.04-sury-8.2/version.txt index d00491f..d8263ee 100644 --- a/ubuntu-24.04-sury-8.2/version.txt +++ b/ubuntu-24.04-sury-8.2/version.txt @@ -1 +1 @@ -1 +2 \ No newline at end of file diff --git a/ubuntu-24.04-sury-8.3/Dockerfile b/ubuntu-24.04-sury-8.3/Dockerfile index 2d38dff..3d43656 100644 --- a/ubuntu-24.04-sury-8.3/Dockerfile +++ b/ubuntu-24.04-sury-8.3/Dockerfile @@ -1,13 +1,13 @@ -FROM ubuntu:noble-20240827.1 +FROM ubuntu:noble-20240904.1 LABEL maintainer="Ralf Geschke " -LABEL last_changed="2024-10-01" +LABEL last_changed="2024-10-03" # necessary to set default timezone Etc/UTC ENV DEBIAN_FRONTEND=noninteractive -# Install PHP 8.2 with some libraries from sury PPA +# Install PHP 8.3 with some libraries from sury PPA RUN apt-get update \ && apt-get -y upgrade \ && apt-get -y dist-upgrade \ @@ -18,11 +18,11 @@ RUN apt-get update \ && 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 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/* @@ -41,7 +41,7 @@ RUN cd /tmp/ \ # taken from official Docker PHP image RUN set -ex \ - && cd /etc/php/8.2/fpm \ + && cd /etc/php/8.3/fpm \ && mkdir -p /run/php \ && { \ echo '[global]'; \ @@ -69,4 +69,4 @@ WORKDIR /usr/share/nginx/html EXPOSE 9000 -CMD ["php-fpm8.2"] +CMD ["php-fpm8.3"] diff --git a/ubuntu-24.04-sury-8.3/version.txt b/ubuntu-24.04-sury-8.3/version.txt index d00491f..0cfbf08 100644 --- a/ubuntu-24.04-sury-8.3/version.txt +++ b/ubuntu-24.04-sury-8.3/version.txt @@ -1 +1 @@ -1 +2 diff --git a/ubuntu-24.04-sury-8.4/Dockerfile b/ubuntu-24.04-sury-8.4/Dockerfile index 12f7002..3e9be70 100644 --- a/ubuntu-24.04-sury-8.4/Dockerfile +++ b/ubuntu-24.04-sury-8.4/Dockerfile @@ -1,8 +1,8 @@ -FROM ubuntu:noble-20240827.1 +FROM ubuntu:noble-20240904.1 LABEL maintainer="Ralf Geschke " -LABEL last_changed="2024-10-01" +LABEL last_changed="2024-10-03" # necessary to set default timezone Etc/UTC ENV DEBIAN_FRONTEND=noninteractive diff --git a/ubuntu-24.04-sury-8.4/version.txt b/ubuntu-24.04-sury-8.4/version.txt index d00491f..0cfbf08 100644 --- a/ubuntu-24.04-sury-8.4/version.txt +++ b/ubuntu-24.04-sury-8.4/version.txt @@ -1 +1 @@ -1 +2 diff --git a/ubuntu-24.04/Dockerfile b/ubuntu-24.04/Dockerfile index f8a2678..0b2734e 100644 --- a/ubuntu-24.04/Dockerfile +++ b/ubuntu-24.04/Dockerfile @@ -1,8 +1,8 @@ -FROM ubuntu:noble-20240827.1 +FROM ubuntu:noble-20240904.1 LABEL maintainer="Ralf Geschke " -LABEL last_changed="2024-10-01" +LABEL last_changed="2024-10-03" # necessary to set default timezone Etc/UTC ENV DEBIAN_FRONTEND=noninteractive diff --git a/ubuntu-24.04/version.txt b/ubuntu-24.04/version.txt index d00491f..0cfbf08 100644 --- a/ubuntu-24.04/version.txt +++ b/ubuntu-24.04/version.txt @@ -1 +1 @@ -1 +2