le-phare / docker-php Goto Github PK
View Code? Open in Web Editor NEWImages docker pour nos environnements de dev
Images docker pour nos environnements de dev
The default user can't add an entry for known_host on the host machine.
Fix suggested by @aegypius
FROM lephare/php:7.2
RUN chown -R www-data. /var/www
USER www-data
RUN mkdir /var/www/.ssh
Peut-on rajouter le tag latest
à chaque build de la dernière version de lephare/php
? (en + du tag de la version évidemment)
Some lephare/php
images don't work on other architectures than x86_64
.
Blackfire's architecture is hardcoded in lephare/php
<= 8.0 :
Lines 48 to 54 in 3a4f6ea
Already patched in 8.1 version :
Lines 52 to 59 in f1eb3aa
There may be other hardcoded dependencies.
Even though PHP versions < 7.4 aren't supported anymore, it could be useful to patch them.
PHP 8 is quite consistent with its extensions and configuration, it may be more efficient for maintainers to use a single Dockerfile with multiple targets. This mean a single configuration file for all PHP 8 targets and parallel build to decrease build time.
This will solve #16 and reduce CI time in the future.
# ================================
# Configure base images
# ================================
FROM php:8.0-fpm as base_php_80
FROM php:8.1-fpm as base_php_81
FROM php:8.2-fpm as base_php_82
FROM php:8.3-fpm as base_php_83
FROM composer:2 as composer
FROM mlocati/php-extension-installer as extension-installer
# ================================
# Configure PHP
# ================================
FROM scratch as config
WORKDIR /etc/php/conf.d/
COPY --link symfony.ini .
WORKDIR /etc/php/pool.d/
COPY --link symfony.pool.conf .
# ================================
# Build Final Images
# ================================
FROM base_php_80 as php_80
COPY --from=config / /
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
COPY --from=extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extension intl gd opcache mbstring zip pdo_pgsql soap pgsql exif apcu memcached imagick xdebug
FROM base_php_81 as php_81
COPY --from=config / /
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
COPY --from=extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extension intl gd opcache mbstring zip pdo_pgsql soap pgsql exif apcu memcached imagick xdebug
# ...
Xdebug is set to "develop" by default. It makes local development quite slow compared to when it is completely off (10 seconds Symfony cache warmup instead of 100 ms in PHP 8.2 in my case).
It used to be set to "off" but this PR changed it: #7
I suggest we put back this env variable, and override will be allowed by passing the same env variable.
Docker logs coming from the container :
php-1 | [05-Mar-2024 09:20:03] WARNING: [pool www] child 26 exited on signal 11 (SIGSEGV - core dumped) after 21.837472 seconds from start
php-1 | [05-Mar-2024 09:20:03] NOTICE: [pool www] child 45 started
php-1 | [05-Mar-2024 09:20:07] WARNING: [pool www] child 44 exited on signal 11 (SIGSEGV - core dumped) after 6.753403 seconds from start
php-1 | [05-Mar-2024 09:20:07] NOTICE: [pool www] child 46 started
Disabling Xdebug via its env variable (XDEBUG_MODE=off
) stops all crashes.
Why workflow "build php images" is scheduled ?
- cron: '0 12 * * SUN' # every sunday
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.