From 5e4af247fa4206250933aa1e0fe8a1c3429d875a Mon Sep 17 00:00:00 2001 From: magdev Date: Sun, 1 Mar 2026 03:55:52 +0100 Subject: [PATCH] Make PHP version configurable in Dockerfile Add BuildKit syntax directive and PHP_VERSION build arg (default 8.4) to allow building with different PHP versions without editing the file. Co-Authored-By: Claude Opus 4.6 --- docker/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index d8b8280..cb10872 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,3 +1,6 @@ +#syntax=docker/dockerfile:1 +ARG PHP_VERSION=8.4 + ############################################################################### # Stage 1 — Download WooCommerce from WordPress.org ############################################################################### @@ -48,7 +51,7 @@ RUN composer install --no-dev --optimize-autoloader --no-interaction ############################################################################### # Stage 4 — Final WordPress image ############################################################################### -FROM wordpress:php8.4 AS wp_runtime +FROM wordpress:php${PHP_VERSION} AS wp_runtime RUN curl -sSfL -o /usr/local/bin/wp \ https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \