-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Avoiding breaking changes such as PR #256 #266
Comments
docker-php-ext-install
I agree. I had to rewrite my custom Dockerfiles to be able to build the images again. |
@taueres in fact the message is not misleading... docker-ext-install script only install extensions bundled into php source code at the origin, for all other extentions installs you should use pecl (or pickle) or even custom/manual download & install. |
@shouze Sorry, the Dockerfile I had to rewrite was a part of proprietary system so I can't paste it here unfortunately. In regards to the error message, even it is not actually misleading, it still confuses users who don't know the command was only made for official extension installation. Since the error message does not give any idea to users that they are attempting to install the third-party extension in a wrong way, they would need to spend a time to figure out why those error messages suddenly came up. I spent not only minutes to find the reason why it suddenly broke. |
@ktogo @taueres as docker-php-ext-install never permits to install pecl extensions I still don't understand how #256 has introduced some BC break. If you can help me to figure out what was working before the PR with a Dockerfile example it would be really handy as I never wanted to introduce some BC break. @ktogo yes a solution could be to return a more explicit message of course. This could be done in a first PR I guess... but I wonder if in fact we couldn't do something more useful! 😄 In fact if you try to install redis extension for example, which should be installed with pecl, maybe that docker-php-ext install should:
|
@shouze Thanks. Regarding how it lost BC, The original installation codes which was working and has lost the compatibility is something like this: (Not exactly same, but almost same to the one that I was using) RUN curl -L -o /tmp/redis.tar.gz https://github.com/phpredis/phpredis/archive/3.0.0.tar.gz \
&& tar xfz /tmp/redis.tar.gz \
&& rm -r /tmp/redis.tar.gz \
&& mv phpredis-3.0.0 /usr/src/php/ext/redis \
&& docker-php-ext-install redis This code tries to install PHPRedis from official source code with the help of This "misusage" is I believe widely used since it's been shared on bunch of sites for example some top answer on Stackoverflow which comes at first result of Google search "docker php install redis". |
@ktogo ok I see... it's effectively a not so good idea to pollute php source code with some externally fetched extension but it's permitted so ok it breaks indeed. BTW as redis for php7 is officially out, the quickest way to install redis 3.0.0 for php7 in your Dockerfile is: RUN pecl install redis-3.0.0 So I can make a PR either:
Please vote for 1, 2 or 3 and let's go for it! |
@ktogo from the example you give, can you confirm that the build of your docker container was failing at this step?
Because php source code is no more present in the container unless you call |
@shouze Both of
Regarding the revert solution, we need to consider that there might be some users who have already fixed their Dockerfiles by adding To avoid this and recover the backward compatibility, I have another proposal:
I haven't tested this, but I guess this would probably solve the BC issue. Needs more thoughts. |
@shouze Since fixing the backward-compatibility may need more discussion, how about firstly improve the error message suggested in #266 (comment) and then think about the BC fix later on? |
@ktogo yes indeed:
This should ensure BC whilst keeping the newly introduced feature that reduce produced container images size. @ktogo will be in Japan for 2 weeks from Aug. 15th, but of course I expect that everything will be fine before that ;) |
@ktogo ok done for the PR about #266 (comment) please take a look at #268 |
@shouze How quick! Thanks 👍 Glad to hear that you are coming to Japan! Yeah lets fix this before it then ;) |
@shouze Just reviewed that! Thanks a lot! |
@shouze I'll need to pull it and test if everything works but I have to go now so will try it tomorrow ;) |
Yikes... I thought I wascrazy for a moment... one minute everything working, the next tens of containers failing... in my case it was ldap... will see what i do abt it... Maybe best is to not depend at all on docker-php-ext-install & similar? we never know what will change again tomorrow.... EDIT: ldap was actually a question of adding a symbolic link, but the changes def broke stuff all around the extensions... I'm aso getting "no such file or directory" errors on the php/ext dir... going after all the changes to see where to put stuff... :/ gonna be a long friday lol |
Any news on this front? |
Sorry for the slow response on this breaking change. We wanted to make sure we fix the issue while also keeping the benefits of removing the extracted source. What we have come up with is #288; let us know if this does or doesn't cover all the issues you encountered. Or if it creates unforeseen catastrophes. |
Hi,
PR #256 changed the way how it finds the installable packages, and then now I am no longer able to install third party packages such as PHPRedis using only
docker-php-ext-install
and have to rewrite all the existing Dockerfiles.I've found some solution at #262 (comment) which wraps the extension installation process with
docker-php-source extract
anddocker-php-source delete
, then adds the extension name to/usr/src/php-available-exts
to "whitelist" the additional extension name. Obviously this solution "works as intended", however, as you can see it requires all the developers to rewrite their customized php Dockerfiles.The question is, why was this big breaking change applied to all the existing php Dockerfiles?
Was there no option to create "a brand new version with breaking changes" and leave the existing Dockerfiles untouched?
I have been using this php docker container for months on some enterprise-class solution, so I would like to avoid this kind of breaking changes to be happening as much as possible.
There is still last-resort solution which "copies the Dockerfile itself and customize the copied one," however I think it's not how this kind of publicly-used Dockerfile should be :(
I would very much appreciated if you could consider not to make such a breaking change to all the existing Dockerfiles within the same version. Thanks!
The text was updated successfully, but these errors were encountered: