-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: merge Dockerfiles, fix XDebug crash, support PHP 8.3, disable XDebug by default #20
Conversation
Dockerfile
Outdated
ARG PHP_VERSION | ||
ARG PHP_EXTENSIONS | ||
|
||
FROM php:${PHP_VERSION}-fpm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: As recommended by hadolint
(https://github.com/hadolint/hadolint) you should alias
FROM php:${PHP_VERSION}-fpm | |
FROM php:${PHP_VERSION}-fpm as base | |
FROM base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dockerfile
Outdated
WORKDIR /usr/local/etc/php/conf.d/ | ||
COPY --link symfony.ini . | ||
WORKDIR /usr/local/etc/php/pool.d/ | ||
COPY --link symfony.pool.conf . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick (non-blocking): You could use this instead IMO
WORKDIR /usr/local/etc/php/conf.d/ | |
COPY --link symfony.ini . | |
WORKDIR /usr/local/etc/php/pool.d/ | |
COPY --link symfony.pool.conf . | |
WORKDIR /usr/local/etc/php | |
COPY --link symfony.ini ./conf.d/ | |
COPY --link symfony.pool.conf ./pool.d/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 👍
Dockerfile
Outdated
WORKDIR /usr/local/etc/php/pool.d/ | ||
COPY --link symfony.pool.conf . | ||
|
||
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: You should the script from the official docker image instead of downloading the latest
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ | |
COPY --from=extension-installer /usr/bin/install-php-extensions /usr/local/bin |
And add your dependencies at the top :
+ FROM mlocati/php-extension-installer:2 as extension-installer
FROM php:${PHP_VERSION}-fpm as base
It is safer and you will have to update manually this dependency whenever a new major version is published
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally chose this approach from their documentation because of the warning about the Docker method, but as it is built in a CI, it should always pull the latest version of the image, so it should be fine to switch to FROM
.
praise: Great work ! Maybe you could add |
note (non-blocking): I think you could drop support for 7.4 as mentionned in the README (supported until 14 Dec. 2023) or update the readme. The 7.x line is no longer supported by PHP so the build can fail any moment now. I would probably isolate the 7.4 build to allow to push image even if php 7.4 image fails |
I updated the 7.4 and 8.0 images because they could be affected by the bug described in #19, and I wanted to be sure that the last images built for these versions are free from this kind of blocking bug. |
4793965
to
4835cdf
Compare
Note: Imagick is disabled for now in PHP 8.3 until Imagick/imagick#640 is fixed.
Resolves #16
Resolves #17
Resolves #18
Resolves #19