Skip to content

Commit

Permalink
add new builds
Browse files Browse the repository at this point in the history
  • Loading branch information
geschke committed Oct 1, 2024
1 parent a5535d3 commit 0241bf3
Show file tree
Hide file tree
Showing 16 changed files with 467 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions image_mappings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

)
72 changes: 72 additions & 0 deletions ubuntu-22.04-sury-8.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
1 change: 1 addition & 0 deletions ubuntu-22.04-sury-8.1/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
72 changes: 72 additions & 0 deletions ubuntu-22.04-sury-8.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
1 change: 1 addition & 0 deletions ubuntu-22.04-sury-8.3/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4
72 changes: 72 additions & 0 deletions ubuntu-24.04-sury-8.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
1 change: 1 addition & 0 deletions ubuntu-24.04-sury-8.2/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
72 changes: 72 additions & 0 deletions ubuntu-24.04-sury-8.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
1 change: 1 addition & 0 deletions ubuntu-24.04-sury-8.3/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
Loading

0 comments on commit 0241bf3

Please sign in to comment.