From 47a60b7d950d25696f49e65049e533083c99c2f9 Mon Sep 17 00:00:00 2001 From: Mukul Sharma Date: Thu, 3 Sep 2026 14:58:30 +0530 Subject: [PATCH] Escape \$PHPIZE_DEPS in php-Dockerfile template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build failed: groovy.lang.MissingPropertyException: No such property: PHPIZE_DEPS. This whole file is rendered through constructTemplate.groovy's SimpleTemplateEngine before it ever becomes a real Dockerfile — bare $IDENTIFIER is Groovy GString interpolation syntax, same as ${IDENTIFIER}, so it tried resolving PHPIZE_DEPS against the render binding (which only has `version`) instead of leaving it as literal shell syntax for docker-php-ext-install to expand at RUN time. \$ is the correct escape for a literal dollar sign in SimpleTemplateEngine output. --- resources/com/homelab/php-Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/com/homelab/php-Dockerfile b/resources/com/homelab/php-Dockerfile index e5ad1e0..ac1b79a 100644 --- a/resources/com/homelab/php-Dockerfile +++ b/resources/com/homelab/php-Dockerfile @@ -17,9 +17,17 @@ # extensions on Alpine (unlike the Debian image, which had them # preinstalled) — installed as a virtual package and removed again # right after, so the final image doesn't carry build tooling. +# \$PHPIZE_DEPS escaped (not ${PHPIZE_DEPS} or bare $PHPIZE_DEPS) — +# this whole file goes through constructTemplate.groovy's +# SimpleTemplateEngine first, which treats bare $IDENTIFIER the same +# as ${IDENTIFIER} (Groovy GString interpolation syntax) and tried to +# resolve it against the render binding (which only has `version`), +# throwing MissingPropertyException before this ever became a real +# Dockerfile. \$ survives the template pass as a literal $, which is +# what the shell needs to actually expand this at RUN time. FROM harbor.192.168.1.7.nip.io/base-images/php:${version}-cli-alpine WORKDIR /var/www/html -RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \ +RUN apk add --no-cache --virtual .build-deps \$PHPIZE_DEPS \ && docker-php-ext-install pdo pdo_mysql \ && apk del .build-deps COPY . .