Skip to content

Commit bfe8a62

Browse files
authored
Build debian11 using sury packages (#10)
1 parent d65216a commit bfe8a62

4 files changed

Lines changed: 20 additions & 5 deletions

File tree

‎.github/workflows/multi-build-push.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
targets:
1313
description: 'Build targets (JSON array)'
1414
type: string
15-
default: '["debian13", "debian12"]'
15+
default: '["debian13", "debian12", "debian11"]'
1616
required: false
1717

1818
env:
@@ -26,7 +26,7 @@ jobs:
2626
build_and_push:
2727
strategy:
2828
matrix:
29-
version: ${{ fromJSON(inputs.targets || '["debian13", "debian12"]') }}
29+
version: ${{ fromJSON(inputs.targets || '["debian13", "debian12", "debian11"]') }}
3030

3131
runs-on: ubuntu-latest
3232
steps:

‎README.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ These images are available from:
1717
1818
## Features
1919

20-
- **Multiple PHP Versions:** Support for a wide range of PHP versions, from modern PHP 8.x to legacy PHP 5.4.
20+
- **Multiple PHP Versions:** Support for a wide range of PHP versions, from modern PHP 8.x to legacy PHP 5.4. Uses the [deb.sury.org](https://deb.sury.org/) repository for up-to-date PHP packages on Legacy Debian images.
2121
- **Apache 2.4:** Comes with Apache 2.4 pre-configured to work with PHP-FPM.
2222
- **Process Management:** Uses `s6` for process supervision, ensuring that both Apache and PHP-FPM are always running.
2323
- **Configuration Templating:** Uses `gomplate` to allow for dynamic configuration of Apache, PHP, and other services using environment variables.
@@ -35,6 +35,11 @@ These images are available from:
3535
### Legacy Images
3636

3737
- **[Debian 11 (Bullseye) Base](/debian11)** - For legacy PHP applications that require PHP 7.4.
38+
39+
## Obsolete Images
40+
41+
These are no longer built.
42+
3843
- **[Debian 10 (Buster) Base](/debian10)** - For legacy PHP applications that require PHP 7.3.
3944
- **[Debian 9 (Stretch) Base](/debian9)** - For legacy PHP applications that require PHP 7.0.
4045
- **[CentOS 7 Base](/centos7)** - For legacy PHP applications that require PHP 5.4.

‎debian11/Dockerfile‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ RUN \
1818
usermod -u 48 www-data && \
1919
groupmod -g 48 www-data
2020

21+
# Update apt sources to use archive.debian.org for EOL Debian 11
22+
RUN set -x \
23+
&& echo 'deb http://archive.debian.org/debian bullseye main' > /etc/apt/sources.list \
24+
&& echo 'deb http://archive.debian.org/debian-security bullseye-security main' >> /etc/apt/sources.list \
25+
;
26+
2127
# Install bash-container functions
2228
RUN set -x \
2329
&& if ! command -v wget > /dev/null; then \
@@ -78,7 +84,11 @@ RUN set -x \
7884
RUN \
7985
export DEBIAN_FRONTEND=noninteractive && \
8086
apt-get update && \
81-
apt-get install --no-install-recommends --no-install-suggests -y wget curl ca-certificates git gnupg openssh-client msmtp-mta apache2 libapache2-mod-xsendfile imagemagick ghostscript s6 \
87+
apt-get install --no-install-recommends --no-install-suggests -y wget curl ca-certificates gnupg && \
88+
curl -sS https://packages.sury.org/php/apt.gpg | gpg --dearmor -o /usr/share/keyrings/sury-php.gpg && \
89+
echo "deb [signed-by=/usr/share/keyrings/sury-php.gpg] https://packages.sury.org/php/ bullseye main" > /etc/apt/sources.list.d/php.list && \
90+
apt-get update && \
91+
apt-get install --no-install-recommends --no-install-suggests -y git openssh-client msmtp-mta apache2 libapache2-mod-xsendfile imagemagick ghostscript s6 \
8292
php7.4-apcu \
8393
php7.4-cli \
8494
php7.4-curl \

‎debian11/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is an Apache and php-fpm image:
44

55
- Base: Debian 11 (Bullseye)
66
- Apache httpd: 2.4
7-
- PHP: 7.4
7+
- PHP: 7.4 (via [deb.sury.org](https://deb.sury.org/))
88

99
This image is designed to be quite configurable and as such is good for getting
1010
started but probably not a great base if you want a highly optimised container.

0 commit comments

Comments
 (0)