Skip to content

Commit

Permalink
update to current Ubuntu 24.04 Docker image, switch latest tag to bas…
Browse files Browse the repository at this point in the history
…e 24.04, add update section in README.md
  • Loading branch information
geschke committed Oct 3, 2024
1 parent 0241bf3 commit d868e5a
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 25 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:"
Expand All @@ -101,18 +109,29 @@ 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: .
file: ${{ matrix.directory }}/Dockerfile
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
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions ubuntu-24.04-sury-8.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ubuntu:noble-20240827.1
FROM ubuntu:noble-20240904.1

LABEL maintainer="Ralf Geschke <ralf@kuerbis.org>"

LABEL last_changed="2024-10-01"
LABEL last_changed="2024-10-03"

# necessary to set default timezone Etc/UTC
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
2 changes: 1 addition & 1 deletion ubuntu-24.04-sury-8.2/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1
2
20 changes: 10 additions & 10 deletions ubuntu-24.04-sury-8.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM ubuntu:noble-20240827.1
FROM ubuntu:noble-20240904.1

LABEL maintainer="Ralf Geschke <ralf@kuerbis.org>"

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 \
Expand All @@ -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/*

Expand All @@ -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]'; \
Expand Down Expand Up @@ -69,4 +69,4 @@ WORKDIR /usr/share/nginx/html

EXPOSE 9000

CMD ["php-fpm8.2"]
CMD ["php-fpm8.3"]
2 changes: 1 addition & 1 deletion ubuntu-24.04-sury-8.3/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1
2
4 changes: 2 additions & 2 deletions ubuntu-24.04-sury-8.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ubuntu:noble-20240827.1
FROM ubuntu:noble-20240904.1

LABEL maintainer="Ralf Geschke <ralf@kuerbis.org>"

LABEL last_changed="2024-10-01"
LABEL last_changed="2024-10-03"

# necessary to set default timezone Etc/UTC
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
2 changes: 1 addition & 1 deletion ubuntu-24.04-sury-8.4/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1
2
4 changes: 2 additions & 2 deletions ubuntu-24.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ubuntu:noble-20240827.1
FROM ubuntu:noble-20240904.1

LABEL maintainer="Ralf Geschke <ralf@kuerbis.org>"

LABEL last_changed="2024-10-01"
LABEL last_changed="2024-10-03"

# necessary to set default timezone Etc/UTC
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
2 changes: 1 addition & 1 deletion ubuntu-24.04/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1
2

0 comments on commit d868e5a

Please sign in to comment.