Compare commits

..

1 Commits

Author SHA1 Message Date
renovate[bot]
ee91a3f203 chore(deps): update image php to v8.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-17 20:51:48 +00:00
13 changed files with 30 additions and 263 deletions

11
.github/renovate.json vendored
View File

@@ -1,13 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>ivuorinen/renovate-config"],
"packageRules": [
{
"description": "Only allow digest updates for PHP base images, not version upgrades",
"matchDatasources": ["docker"],
"matchPackageNames": ["php", "library/php"],
"matchUpdateTypes": ["major", "minor", "patch"],
"enabled": false
}
]
"extends": ["github>ivuorinen/renovate-config"]
}

View File

@@ -7,9 +7,6 @@ on:
- cron: "0 2 * * 1" # At 2:00 on Monday.
push:
branches: ["main"]
paths:
- "**/Dockerfile"
- ".github/workflows/**"
workflow_dispatch:
env:
@@ -21,8 +18,9 @@ env:
permissions: read-all
jobs:
build:
runs-on: ${{ matrix.arch == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
BuildAndRelease:
runs-on: ubuntu-latest
continue-on-error: true
permissions:
contents: read
packages: write
@@ -30,90 +28,26 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [php74, php80, php81, php82, php83, php84, php85]
php: [php74, php80, php81, php82, php83, php84]
arch: ["linux/amd64", "linux/arm64"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Log in to the Container registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Determine platform pair
id: platform
run: |
echo "pair=$(echo '${{ matrix.arch }}' | tr '/' '-')" >> "$GITHUB_OUTPUT"
- name: Build and push by digest
id: build
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
- name: Build and Push (${{ matrix.php }} / ${{ matrix.arch }})
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
file: ${{ matrix.php }}/Dockerfile
platforms: ${{ matrix.arch }}
outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
cache-from: type=gha,scope=${{ matrix.php }}-${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=${{ matrix.php }}-${{ matrix.arch }}
- name: Export digest
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: digests-${{ matrix.php }}-${{ steps.platform.outputs.pair }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
merge:
runs-on: ubuntu-latest
needs: [build]
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
php: [php74, php80, php81, php82, php83, php84, php85]
steps:
- name: Download digests
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: /tmp/digests
pattern: digests-${{ matrix.php }}-*
merge-multiple: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Log in to the Container registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
# shellcheck disable=SC2046
docker buildx imagetools create \
--tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.php }} \
$(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
- name: Inspect image
run: |
docker buildx imagetools inspect \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.php }}
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.php }}

View File

@@ -5,9 +5,6 @@ name: PR Build and Report
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- "**/Dockerfile"
- ".github/workflows/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -24,7 +21,7 @@ permissions: read-all
jobs:
pr-build:
name: PR Build
runs-on: ${{ matrix.arch == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
@@ -36,11 +33,11 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [php74, php80, php81, php82, php83, php84, php85]
php: [php74, php80, php81, php82, php83, php84]
arch: ["linux/amd64", "linux/arm64"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set result filename
id: resultfile
@@ -52,10 +49,10 @@ jobs:
echo "tag_arch=$TAG_ARCH" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Log in to the Container registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
@@ -63,7 +60,7 @@ jobs:
- name: Docker metadata
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.php }}
tags: |
@@ -72,7 +69,7 @@ jobs:
- name: Extract base image
id: baseimage
run: |
BASE_IMAGE="$(grep -m1 '^FROM ' ./${{ matrix.php }}/Dockerfile | awk '{print $2}')"
BASE_IMAGE="$(grep -m1 '^FROM ' ${{ env.DOCKERFILE_PATH }} | awk '{print $2}')"
echo "base_image=$BASE_IMAGE" >> "$GITHUB_OUTPUT"
- name: Build Docker image (capture cache usage)
@@ -85,8 +82,6 @@ jobs:
docker buildx build \
--platform ${{ matrix.arch }} \
--tag "$IMAGE_TAG" \
--cache-from type=gha,scope=${{ matrix.php }}-${{ matrix.arch }} \
--cache-to type=gha,mode=max,scope=${{ matrix.php }}-${{ matrix.arch }} \
--progress plain \
--load ./${{ matrix.php }}/ | tee build.log
END="$(date +%s)"
@@ -135,7 +130,7 @@ jobs:
mv ${{ steps.resultfile.outputs.filename }} results/
- name: Upload build result
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: build-results-${{ steps.resultfile.outputs.filename }}
path: results/
@@ -157,7 +152,7 @@ jobs:
steps:
- name: Download all build results
id: dl
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
path: results
@@ -193,3 +188,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.pull_request.number }}
body-file: comment.md

View File

@@ -5,20 +5,8 @@ name: Lint Code Base
on:
push:
branches: [master, main]
paths:
- "**/Dockerfile"
- ".github/workflows/**"
- ".mega-linter.yml"
- ".hadolint.yaml"
- ".yamllint.yml"
pull_request:
branches: [master, main]
paths:
- "**/Dockerfile"
- ".github/workflows/**"
- ".mega-linter.yml"
- ".hadolint.yaml"
- ".yamllint.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -41,4 +29,4 @@ jobs:
steps:
- name: Run PR Lint
# https://github.com/ivuorinen/actions
uses: ivuorinen/actions/pr-lint@1da3a0e79fcd7da6bed9ee1979f1449ba11f58f9 # v2026.03.14
uses: ivuorinen/actions/pr-lint@cbfddb24339ba1e0129cc50ab5a0045131b8a2ba # v2026.01.13

View File

@@ -1,13 +0,0 @@
---
extends: default
rules:
braces:
max-spaces-inside: 1
new-lines:
level: warning
type: unix
line-length:
max: 500
comments:
min-spaces-from-content: 1
truthy: disable

View File

@@ -1,89 +1,3 @@
# docker-php-with-imagick-multi
[![Build](https://github.com/ivuorinen/docker-php-with-imagick-multi/actions/workflows/docker-image.yml/badge.svg)](https://github.com/ivuorinen/docker-php-with-imagick-multi/actions/workflows/docker-image.yml)
[![License](https://img.shields.io/github/license/ivuorinen/docker-php-with-imagick-multi)](https://github.com/ivuorinen/docker-php-with-imagick-multi)
[![Last Commit](https://img.shields.io/github/last-commit/ivuorinen/docker-php-with-imagick-multi)](https://github.com/ivuorinen/docker-php-with-imagick-multi/commits/main)
Multi-architecture Docker images for PHP 7.4 through 8.5 with Imagick and Composer pre-installed.
## Available Images
| PHP Version | Tag | Pull Command |
| ----------- | ------- | ------------------------------------------------------------------- |
| PHP 7.4 | `php74` | `docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php74` |
| PHP 8.0 | `php80` | `docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php80` |
| PHP 8.1 | `php81` | `docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php81` |
| PHP 8.2 | `php82` | `docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php82` |
| PHP 8.3 | `php83` | `docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php83` |
| PHP 8.4 | `php84` | `docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php84` |
| PHP 8.5 | `php85` | `docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php85` |
## Architectures
- `linux/amd64`
- `linux/arm64`
## Included Software
### PHP Extensions
| Extension | Description |
| ---------- | ---------------------------------- |
| bcmath | Arbitrary precision mathematics |
| intl | Internationalization (ICU) |
| mbstring | Multibyte string handling |
| pdo | PHP Data Objects database layer |
| xml | XML parsing and manipulation |
| gd | Image processing (freetype + jpeg) |
| exif | Image metadata reading |
| pcntl | Process control |
| imagick | ImageMagick bindings (via PECL) |
### System Libraries
| Library | Purpose |
| ------------------ | --------------------------- |
| libicu-dev | ICU for intl extension |
| libxml2-dev | XML parsing |
| libfreetype6-dev | Font rendering (GD) |
| libjpeg62-turbo-dev| JPEG support (GD) |
| libpng-dev | PNG support (GD) |
| libonig-dev | Oniguruma regex (mbstring) |
| libmagickwand-dev | ImageMagick C API (imagick) |
### Tools
- **Composer** (latest, installed to `/usr/local/bin/composer`)
## Usage
Pull an image:
```sh
docker pull ghcr.io/ivuorinen/docker-php-with-imagick-multi:php84
```
Run a container:
```sh
docker run --rm ghcr.io/ivuorinen/docker-php-with-imagick-multi:php84 php -v
```
Use as a base image in your Dockerfile:
```dockerfile
FROM ghcr.io/ivuorinen/docker-php-with-imagick-multi:php84
COPY . /app
WORKDIR /app
RUN composer install --no-dev
```
## Building Locally
```sh
docker build -t my-php84 ./php84/
```
## License
See [LICENSE](LICENSE) for details.
PHP 7.4-8.4 with imagick for arm64 and amd64

View File

@@ -1,5 +1,5 @@
# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
FROM php:7.4@sha256:620a6b9f4d4feef2210026172570465e9d0c1de79766418d3affd09190a7fda5
FROM php:8.5@sha256:40bb9e411d6f8b852365c56ce3bb665a4e58d37f3165db0a6d7139b8523affe2
LABEL \
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \

View File

@@ -1,5 +1,5 @@
# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
FROM php:8.0@sha256:0569e384b9064c04dec55dc6e41be41b494a878dfbb6577a7d76bd50cfd5bc00
FROM php:8.5@sha256:40bb9e411d6f8b852365c56ce3bb665a4e58d37f3165db0a6d7139b8523affe2
LABEL \
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \

View File

@@ -1,5 +1,5 @@
# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
FROM php:8.1@sha256:a57aba6a50bbb85fcd6fffaf45048c9f54a9cdec0e64d0cb5985d4d1a44e2634
FROM php:8.5@sha256:40bb9e411d6f8b852365c56ce3bb665a4e58d37f3165db0a6d7139b8523affe2
LABEL \
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \

View File

@@ -1,5 +1,5 @@
# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
FROM php:8.2@sha256:ed4385b854a7ef4aeee1108c75333443d64c937faaf7c7d28bf63a436df06428
FROM php:8.5@sha256:40bb9e411d6f8b852365c56ce3bb665a4e58d37f3165db0a6d7139b8523affe2
LABEL \
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \

View File

@@ -1,5 +1,5 @@
# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
FROM php:8.3@sha256:2643907fd60518306cfe9b68ac1e969065e55362b685b16b1c2b333af1e494ef
FROM php:8.5@sha256:40bb9e411d6f8b852365c56ce3bb665a4e58d37f3165db0a6d7139b8523affe2
LABEL \
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \

View File

@@ -1,5 +1,5 @@
# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
FROM php:8.4@sha256:9eddbbdc9dc382a1e40d1d41ef5306ca00dbf088e3ba066f08717827d699592e
FROM php:8.5@sha256:40bb9e411d6f8b852365c56ce3bb665a4e58d37f3165db0a6d7139b8523affe2
LABEL \
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \

View File

@@ -1,43 +0,0 @@
# vim: set ft=dockerfile ts=2 sw=2 sts=2 et:
FROM php:8.5@sha256:2d7a7e055947c398314250fb6d657c85979872c44ce9912b9dc9d1456439b0b3
LABEL \
maintainer="Ismo Vuorinen <ismo@ivuorinen.net>" \
version="1.0" \
description="PHP 8.5 with Imagick and Composer"
# Install PHP extensions and required libraries
RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
libicu-dev \
libxml2-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libonig-dev \
libmagickwand-dev \
unzip \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \
bcmath \
intl \
mbstring \
pdo \
xml \
gd \
exif \
&& docker-php-ext-configure pcntl \
&& docker-php-ext-install pcntl \
&& yes '' | pecl install imagick \
&& docker-php-ext-enable imagick \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& curl -sS -o composer-setup.php https://getcomposer.org/installer \
&& EXPECTED_HASH="$(curl -sS https://composer.github.io/installer.sig)" \
&& ACTUAL_HASH="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" \
&& if [ "$EXPECTED_HASH" != "$ACTUAL_HASH" ]; then echo 'Composer installer corrupt'; rm composer-setup.php; exit 1; fi \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& rm composer-setup.php \
&& php --version \
&& composer --version