Skip to content

Commit

Permalink
Merge pull request #1 from digiBlink/upgrade_debian_to_bullseye
Browse files Browse the repository at this point in the history
Upgrade to Debian Bullseye
  • Loading branch information
zxpower authored Oct 25, 2024
2 parents fd42832 + a1bc4d5 commit 52842f5
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 15 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Image Build
on:
workflow_call:

jobs:
build-image:
name: Build and push Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
digiblink/bullseye-nginx-php5-fpm
ghcr.io/digiblink/bullseye-nginx-php5-fpm
tags: |
type=sha
type=ref,event=tag
type=raw,value=latest,enable={{is_default_branch}}
flavor: |
latest=auto
prefix=,onlatest=false
suffix=
labels: |
org.opencontainers.image.vendor=digiBlink
org.opencontainers.image.source=https://github.com/${{ env.REPO_NAME }}
org.opencontainers.image.title=Debian based image with latest PHP5 FPM and Nginx
org.opencontainers.image.description=Debian based image with latest PHP5 FPM and Nginx
org.opencontainers.image.created=${{ steps.time.outputs.time }}
org.opencontainers.image.revision=${{ steps.short-sha.outputs.sha }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ vars.DH_USER }}
password: ${{ secrets.DH_PAT }}

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build image and push to GitHub Container Registry
uses: docker/build-push-action@v6
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
13 changes: 13 additions & 0 deletions .github/workflows/trigger-main-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Trigger on Merge to Main / Tag

on:
push:
branches:
- main
tags:
- '*'

jobs:
build-image:
uses: ./.github/workflows/build-image.yaml
secrets: inherit
13 changes: 13 additions & 0 deletions .github/workflows/trigger-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Trigger on PR

on:
pull_request:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build-image:
uses: ./.github/workflows/build-image.yaml
secrets: inherit
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:jessie
FROM debian:bullseye

# prevent Debian's PHP packages from being installed
# https://github.com/docker-library/php/pull/542
Expand All @@ -21,7 +21,9 @@ ENV PHPIZE_DEPS \
pkg-config \
re2c

RUN apt-get update && apt-get install -y \
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
$PHPIZE_DEPS \
nginx \
ca-certificates \
Expand Down Expand Up @@ -52,9 +54,9 @@ ENV PHP_LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie"

ENV GPG_KEYS 0BD78B5F97500D450838F95DFE857D9A90D90EC1 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3

ENV PHP_VERSION 5.6.38
ENV PHP_URL="https://secure.php.net/get/php-5.6.38.tar.xz/from/this/mirror" PHP_ASC_URL="https://secure.php.net/get/php-5.6.38.tar.xz.asc/from/this/mirror"
ENV PHP_SHA256="c2fac47dc6316bd230f0ea91d8a5498af122fb6a3eb43f796c9ea5f59b04aa1e" PHP_MD5=""
ENV PHP_VERSION 5.6.40
ENV PHP_URL="https://secure.php.net/get/php-5.6.40.tar.xz/from/this/mirror" PHP_ASC_URL="https://secure.php.net/get/php-5.6.40.tar.xz.asc/from/this/mirror"
ENV PHP_SHA256="1369a51eee3995d7fbd1c5342e5cc917760e276d561595b6052b21ace2656d1c" PHP_MD5=""

RUN set -xe; \
\
Expand Down Expand Up @@ -87,9 +89,7 @@ RUN set -xe; \
wget -O php.tar.xz.asc "$PHP_ASC_URL"; \
export GNUPGHOME="$(mktemp -d)"; \
for key in $GPG_KEYS; do \
gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \
done; \
gpg --batch --verify php.tar.xz.asc php.tar.xz; \
rm -rf "$GNUPGHOME"; \
Expand Down Expand Up @@ -145,7 +145,7 @@ RUN set -eux; \
--enable-zip \
--with-curl \
--with-libedit \
--with-openssl \
--with-ssl=/usr/local/ssl \
--with-zlib \
--with-mysqli \
--with-pdo-mysql \
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# digiblink/jessie-nginx-php5-fpm Docker Container
# digiblink/bullseye-nginx-php5-fpm Docker Container

Maintained by [digiBlink](http://digiblink.eu) - [docker hub link](https://hub.docker.com/r/digiblink/jessie-nginx-php5-fpm/)

Container with:

* Debian Jessie (default time zone `Europe/Riga`)
* `nginx` 1.6.2
* PHP-FPM 5.6.38
* WP-CLI 2.4.0
* Debian Bullseye (default time zone `Europe/Riga`)
* `nginx` 1.18.0
* PHP-FPM 5.6.40
* WP-CLI 2.11.0
* `git`

Based on following containers:
Expand Down
2 changes: 1 addition & 1 deletion docker-build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

docker build --no-cache -t digiblink/jessie-nginx-php5-fpm .
docker build --no-cache -t digiblink/bullseye-nginx-php5-fpm .

0 comments on commit 52842f5

Please sign in to comment.