-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add support for entrypoint scripts #162
Conversation
02d5e14
to
4cf8237
Compare
Note: If you want to land #163 first, then this same patch built on that branch is here: https://github.com/andrewnicols/moodle-php-apache/pull/new/streamline_entrypoint |
Also, earlier this evening I encountered this bug: docker/for-mac#5509 I've patched it some hours ago in the script but I've now also found the bug report so adding it to this issue for completeness. |
Hi Andrew, nice one. I just have an overall (related to this and other PRs that come after this) comment and a couple of observations about this one:
I'll continue with #163 while discuss about the points above... ciao :-) |
4cf8237
to
31cb26c
Compare
This change makes it much faster to make smaller changes to the image by: - moving the ADD commands to more targeted additions in order of build size - breaking out the Oracle and sqlsrv builds into their own ADD and RUN sections in the Dockerfile - moving the addition of non build-related files to right at the end of the Dockerfile These changes mean that it is possible to more easily developer the image, for example: - you can now make changes to files within the /usr directory without recompiling all PHP extensions - you can now iterate on the Oracle and/or sqlsrv extensions without recompiling all PHP extensinos - you can now iterate on the sqlsrv extension, without recompiling all PHP extensions Whist this has little effect on the end image, or the build process within CI systems, local development is substantially improved (unless you're making changes to the php-extensions.sh script).
0a88c65
to
ec74197
Compare
I can understand this feeling, but at the same time I don't think that we are. Having the ability to override the standard entrypoint (provided by the upstream php image) is a requirement for adding #167 in some sense, but using an entrypoint to change a single ini file is quite a heavy-handed approach. These options are not required, but they're also not mutually exclusive. You may wish to have a standard set of shell scripts and ini files that you wish to use, but also have a need to tweak the ini setting as a one-off change. Or you may want to only change one ini file, and it's significantly easier to do so by specifying a single environment variable than by creating a folder, putting a .ini file in it, and mounting it.
You know, it had never occurred to me that I've renamed this to
|
8a4f26d
to
7c90b9c
Compare
This commit adds support for run-time configuration which is executed as part of the startup of the container. Two options are supported: * shell scripts; and * .ini files for PHP configuration. These can be placed into a new directory, located at /docker-entrypoint-initdb.d and files are executed in lexical order returned by a bash glob.
7c90b9c
to
1dac7cb
Compare
I was just thinking about this some more and have some further use-cases for either entrypoint and/or simplified INI:
|
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.
Perfect, thanks!
Will merge this soon (once the previous master multi-arch images are already published).
And then will backport this to as many php versions as possible. Surely 7.4 and up (like it's being done for #163). That should be enough.
(done, all >= 7.4 images now support the entrypoints, yay!) |
This commit adds support for run-time configuration which is executed as part of the startup of the container.
Two options are supported:
These can be placed into a new directory, located at /docker-entrypoint-initdb.d and files are executed in lexical order returned by a bash glob.