This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user