From d86e27db6d48cb1305933f49f049e933a2150ab0 Mon Sep 17 00:00:00 2001 From: Bram Date: Fri, 3 Apr 2026 11:20:33 +0200 Subject: [PATCH] doubt that this will work --- Dockers/remote-php-container/Dockerfile | 3 +++ Dockers/remote-php-container/entrypoint.sh | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Dockers/remote-php-container/Dockerfile b/Dockers/remote-php-container/Dockerfile index 8356aef..200e183 100644 --- a/Dockers/remote-php-container/Dockerfile +++ b/Dockers/remote-php-container/Dockerfile @@ -1,6 +1,9 @@ # Use an official PHP runtime as a parent image FROM php:8.1-fpm +# CakePHP bin/cake uses this to skip probing; avoids edge cases with FPM images or CRLF-mangled scripts +ENV PHP=/usr/local/bin/php + # Set the working directory WORKDIR /workspace diff --git a/Dockers/remote-php-container/entrypoint.sh b/Dockers/remote-php-container/entrypoint.sh index b2016ad..7ab9dcf 100644 --- a/Dockers/remote-php-container/entrypoint.sh +++ b/Dockers/remote-php-container/entrypoint.sh @@ -70,6 +70,11 @@ cd /workspace # Install PHP dependencies composer install +# CakePHP: CRLF in bin/cake (common after Windows checkouts) breaks the shell script and PHP_SAPI probing +if [ -f bin/cake ]; then + sed -i 's/\r$//' bin/cake +fi + # Copy the environment file to the repository's environments directory if [ -f /environment/.env ]; then cp /environment/.env /workspace/.env