Repository navigation
Conversation
….5.69
4.5.68 moved PHP's sendmail_path into the container's environment
(sendmail_path = "${MADOCK_SENDMAIL_PATH}" with the value in the compose
file). php-fpm and docker exec saw it; cron jobs did not. cron starts its
jobs with an environment of its own, so on a 4.5.68 image every mail() from
cron got an empty sendmail_path and returned false. Measured on a temporary
project: docker exec read the msmtp command, a www-data cron job read ''
and mail() returned false. 4.5.68 was tagged -norelease and never reached a
machine.
The value is written into php.ini again, but as the last step of the image
(end of the footer snippet, after the entrypoint script; only ENTRYPOINT and
CMD follow). It is still the one line that differs between a template and
its muted clone, so a clone now rebuilds that layer alone instead of the 14
after it. The compose files no longer carry MADOCK_SENDMAIL_PATH. The host,
port and sender are still validated before render, now because they are
pasted into a RUN line; the build fails if the line did not land in both
php.ini files.
Tests, each broken and seen failing:
- TestTheMailSettingsChangeOnlyTheLastLayerOfThePhpImage fails with a RUN
added after the step, with the sender reaching another RUN, and with the
variable back in php.yml.
- e2e TestTheMailSettingsChangeOnlyTheLastLayerAndReachCron (green, 259 s):
two projects with different mail share 27 of 28 layers, CLI and php-fpm
read their own values, mail() reaches mailpit from docker exec and from a
cron job, a new sender after rebuild changes the last layer only. With
4.5.68's templates the cron part fails (the job saw '' and false); with
the line back in php/ini the layer checks fail: 28 and 28 layers, shared
prefix 17.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
4.5.69: PHP's
sendmail_pathis written into php.ini again, as the php image's last step.4.5.68 (tagged
-norelease, never released) kept the value in the container's environment. php-fpm anddocker execsaw it, but cron starts its jobs with an environment of its own, so everymail()from a cron job got an emptysendmail_pathand returned false.Now the line is at the end of the
footersnippet. A muted clone, the only project that differs from its template in this line, rebuilds that one layer instead of the 14 after the old position. The compose files no longer carryMADOCK_SENDMAIL_PATH.Tests (each was broken on purpose and seen failing):
TestTheMailSettingsChangeOnlyTheLastLayerOfThePhpImage. Fails when a layer follows the step, when the Dockerfiles differ anywhere else, or when the compose file carries the value.TestTheMailSettingsChangeOnlyTheLastLayerAndReachCron. Checks that two projects share 27 of 28 layers and thatmail()reaches mailpit both fromdocker execand from a cron job. With 4.5.68's templates the cron check fails; with the line in the middle of the image the layer check fails (shared prefix 17).