-
Notifications
You must be signed in to change notification settings - Fork 2k
More modules #8
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
Comments
Some more discussion from IRC (copied instead of linked because BotBot is currently offline):
|
I'd probably lean more towards the "throw everything* into the one build" camp, at the moment, after dwelling on this topic for a while. The point being, I'd like to cater for the majority of folks as simply as possible; without them having to write their own Dockerfiles. While I do think that would give us the quickest route to useful and usable images, the idea of having a more "programmable" build is intriguing and should definitely be something we look in to. A simple way of saying "I want a PHP image, with extensions x, y, z please", being the ultimate goal. * By "everything", I mean "95% of extensions that people will generally be looking for". |
+1 on throwing everything in, makes creating dockerfiles that inherit from it way easier. |
It somehow feels we're re-inventing the wheel here. Would it be an option to use PHP Build? It's an proven solution (For example, travis uses it to build their CI VMS) Additionally, PHP-Build has a huge list of recipes for all versions of PHP; https://github.com/CHH/php-build/tree/master/share/php-build/definitions They have a "default" list of modules defined, but this can be easily overridden in the install script That includes ancient versions (which still is useful sometimes for testing). IMO, combining the effort of the Docker community with that of PHP Build, would make optimum use of knowledge and manpower. |
Since the PHP Build is not officially supported by upstream PHP, I would be hesitant to add it in. I would not be against learning what modules that they and other packagers (ex: debian) enable to see which ones are generally needed. |
Ok, that may be an issue if this will be communicated as the official php image on Docker. Otoh (and as far as I can tell) PHP Build does a standard compile from source, albeit with some nice scripts and non-standard paths. The primary reason for my previous comment is that I'd hate to see valuable time lost for things that other people already have spent years on figuring out. Which modules? Shared Extensions Enabling extensions/modules could be done either by;
(The bullets above are not mutually exclusive, combinations of the above should be possible) |
This ended up way more verbose than intended, so I'll preface: tl;dr -- I think this image could legitimately punt the question of configure flags, shared or static extensions (and external dependencies thereof) downstream to the consumer by loading the information for what to do from a few files for which it can provide defaults, and access them with I think it would be best to talk about the types of extensions as PHP describes them here which I'll shorten below: Core Extensions
eg, Phar (which can be disabled with a flag at compile time) Bundled Extensions
eg, PCNTL, JSON, GD, PDO External Extensions
eg, Mcrypt, Mysql, Mysqli, Mysqnd PECL ExtensionsThese extensions are available from PECL. eg, ImageMagick, Libevent The questions I would ask are:
|
@winmillwill as an answer to point 5: it would not necessarily have to know anything about it per se, but nearly all (modern) PHP libraries and frameworks rely on it. The current images do not support installation, as openssl support is missing. I have opened a separate issue for this: #17 |
I'll just add my $0.02 that I ran up against this issue today in the form of missing support for |
I think you should make the OK, maybe it's me. |
+1, it looks like this library does a lot more than the readme advertises, I'm still not sure the correct way to enable modules or extensions. Thanks! |
@awc737 You can have a look at my repo, I think it's the right way to install extensions. |
Nice, @AaronJan I think the documentation needs some examples like that. |
@thaJeztah THX : ) |
Made a new pull request. [https://github.com/docker-library/docs/pull/130] People should know about this. |
Docs have been added for |
The script seems broken afaict. Using: pierre@jessie:~$ docker exec poolleage_web_1 ls /usr/local/etc/php/conf.d/ Nothing about new extensions ini settings. Loudly thinking: From the make output: but in the final image: I am not sure why nothing gets copied or changed. The build seems to be correct. However I am sure to understand how it is done or why. Bundled extensions should always be built. Default core extensions always be available (loaded). There are some build cases where one should really compile extensions at the same time than the core, not using phpize. then a simple script to enable or disable extensions at wish can be provided. Something similar to apache enable/disable module script. docker-php-*-ext can be kept for non core extensions. At some point (working on it :), it could use Pickle to install extensions using either pickle directly or composer. I could spend some time on a PR, how I would like to discuss it before, just to avoid doing double work or something you would not like :) |
As #6 and #7 help highlight, we really don't have a good solution to accessing the wide array of modules and extensions included with PHP.
My own personal best idea so far is to just compile everything we can as part of the base image, which does feel properly in the "spirit of PHP", but also seems like a pretty hacky solution. If we can't come up with anything better (or if we get someone from upstream PHP validating that as a properly "OK" solution), then we should run with that, but I'd like to at least leave it open for discussion first for a little while in case someone's got a better idea. 😄
The text was updated successfully, but these errors were encountered: