mysql
Build and Push Docker Images / build-and-push (push) Successful in 5m22s

This commit is contained in:
2026-04-03 11:41:33 +02:00
parent 442c18c4aa
commit 975299919e
2 changed files with 3 additions and 15 deletions
+3 -6
View File
@@ -1,9 +1,6 @@
# Use an official PHP runtime as a parent image # Use an official PHP runtime as a parent image
FROM php:8.1-fpm 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 # Set the working directory
WORKDIR /workspace WORKDIR /workspace
@@ -13,7 +10,7 @@ RUN apt-get update && apt-get install -y \
openssh-client \ openssh-client \
unzip \ unzip \
iputils-ping \ iputils-ping \
dos2unix \ default-mysql-client \
libpng-dev \ libpng-dev \
libjpeg-dev \ libjpeg-dev \
libfreetype6-dev \ libfreetype6-dev \
@@ -27,7 +24,7 @@ RUN apt-get update && apt-get install -y \
cron \ cron \
sudo \ sudo \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \ && docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install gd mbstring zip pdo pdo_mysql pdo_pgsql pgsql intl && docker-php-ext-install gd mbstring zip pdo pdo_mysql mysqli pdo_pgsql pgsql intl
# Install Redis PHP extension via PECL # Install Redis PHP extension via PECL
RUN apt-get update && apt-get install -y --no-install-recommends $PHPIZE_DEPS libssl-dev \ RUN apt-get update && apt-get install -y --no-install-recommends $PHPIZE_DEPS libssl-dev \
@@ -74,7 +71,7 @@ RUN chmod +x /usr/local/bin/entrypoint.sh
COPY crontab /etc/cron.d/laravel-cron COPY crontab /etc/cron.d/laravel-cron
RUN chmod 0644 /etc/cron.d/laravel-cron RUN chmod 0644 /etc/cron.d/laravel-cron
RUN crontab /etc/cron.d/laravel-cron RUN crontab /etc/cron.d/laravel-cron
RUN dos2unix /usr/local/bin/entrypoint.sh
# Expose ports # Expose ports
EXPOSE 8000 EXPOSE 8000
@@ -70,11 +70,6 @@ cd /workspace
# Install PHP dependencies # Install PHP dependencies
composer install 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 # Copy the environment file to the repository's environments directory
if [ -f /environment/.env ]; then if [ -f /environment/.env ]; then
cp /environment/.env /workspace/.env cp /environment/.env /workspace/.env
@@ -183,9 +178,5 @@ if [ -z "$START_COMMAND" ]; then
START_COMMAND='php -S 0.0.0.0:8000' START_COMMAND='php -S 0.0.0.0:8000'
fi fi
if [ -f /workspace/bin/cake ]; then
sed -i 's/\r$//' /workspace/bin/cake
fi
# Always run the app under pm2-runtime # Always run the app under pm2-runtime
exec pm2-runtime "$START_COMMAND" exec pm2-runtime "$START_COMMAND"