From 36481c32965e89889049f5d5b52df544e48b42c5 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 21 Oct 2026 17:08:39 +0200 Subject: [PATCH] Use simplified version of Dockerfile --- Dockerfile | 85 ++---------------------------------------------------- 1 file changed, 2 insertions(+), 83 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7b6b20e..be4df2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,79 +1,4 @@ -FROM php:8.4-fpm-alpine AS chill_base_php82 - -ENV POSTGRES_VERSION=16 - -# default UID for the PHP user -ARG UID=1000 -ARG GID=1000 - -# install php extensions and deps -# apk add --no-cache --update --virtual rabbitmq-c-dev rabbitmq-c-utils gcc g++ make autoconf && pecl install amqp -RUN apk update && apk add --no-cache \ - wget gnupg \ - libpq-dev \ - icu-dev icu-libs icu-data-full \ - oniguruma-dev \ - libzip libzip-dev \ - linux-headers \ - gcc g++ make autoconf \ - bash git \ - rabbitmq-c rabbitmq-c-dev \ - && docker-php-ext-install pdo_pgsql intl mbstring zip bcmath exif sockets \ - && git clone https://github.com/nikic/php-ast.git \ - && cd php-ast \ - && phpize \ - && ./configure \ - && make install \ - && echo 'extension=ast.so' > /usr/local/etc/php/php.ini \ - && cd .. && rm -rf php-ast \ - && pecl install redis \ - && docker-php-ext-enable redis \ - && pecl install amqp \ - && docker-php-ext-enable amqp \ - && apk add libpng-dev libjpeg-turbo-dev freetype-dev \ - && docker-php-ext-configure gd --with-freetype --with-jpeg \ - && docker-php-ext-install -j$(nproc) gd \ - && apk add postgresql${POSTGRES_VERSION}-client \ - && apk del --purge wget gnupg libpq-dev icu-dev oniguruma-dev libzip-dev linux-headers gcc g++ make autoconf - -RUN { \ - echo ""; \ - echo "memory_limit = 512M"; \ - echo ""; \ - } >> /usr/local/etc/php/conf.d/memory_limit.ini - -RUN { \ - echo ""; \ - echo "[Date]"; \ - echo "date.timezone = Europe/Brussels"; \ - echo ""; \ - } >> /usr/local/etc/php/conf.d/date.ini - -# temporary fix, while php-cs-fixer has conflict dependencies -# with chill -RUN curl -o /usr/local/bin/php-cs-fixer https://cs.symfony.com/download/php-cs-fixer-v3.phar \ - && chmod +x /usr/local/bin/php-cs-fixer -# to make php-cs-fixer works with php 8.2 -ENV PHP_CS_FIXER_IGNORE_ENV=1 - -COPY --from=composer:2 /usr/bin/composer /usr/bin/composer -ENV COMPOSER_ALLOW_SUPERUSER=1 -ENV COMPOSER_MEMORY_LIMIT=-1 - -# shell bash preference -RUN sed -i " \ - s|root:x:0:0:root:/root:/bin/ash|root:x:0:0:root:/root:/bin/bash|g; \ - s|postgres:x:70:70:PostgreSQL user:/var/lib/postgresql:/bin/sh|postgres:x:70:70:PostgreSQL user:/var/lib/postgresql:/bin/bash|g" \ - /etc/passwd - -# chmod on redis.so -RUN chmod 755 -R /usr/local/lib/php/extensions/ - -WORKDIR /var/www/app - -CMD ["php-fpm"] - -FROM chill_base_php82 AS chill_php82 +FROM chill/base-image:8.4-edge # copy directories @@ -96,12 +21,6 @@ ADD ./entrypoint.sh /. RUN chmod +x /entrypoint.sh -RUN mkdir -p /var/www/app/var/cache /var/www/app/var/log && \ - chown -R 82:82 /var/www/app && \ - chmod -R 755 /var/www/app && \ - chown -R 82:82 /usr/local/etc/php/conf.d && \ - chmod -R 755 /usr/local/etc/php/conf.d - ENTRYPOINT ["/entrypoint.sh"] ENV PHP_FPM_USER=www-data \ @@ -109,4 +28,4 @@ ENV PHP_FPM_USER=www-data \ COMPOSER_HOME=/var/www/app/.composer \ SESSION_LIFETIME=10800 -CMD [ "php-fpm" ] +CMD [ "php-fpm" ] \ No newline at end of file