wyveo / nginx-php-fpm

Nginx + PHP-FPM 8.2.x / 8.1.x / 8.0.x / 7.4.x / 7.3.x / 7.2.x / 7.1.x / 7.0.x + Composer built on Debian (Bullseye/Buster) image
https://hub.docker.com/r/wyveo/nginx-php-fpm
MIT License
351 stars 248 forks source link

Can not install Kafka extension in php 7.2 #78

Open ThanhQuang1410 opened 4 months ago

ThanhQuang1410 commented 4 months ago

Here is my content inside Dockerfile

FROM wyveo/nginx-php-fpm:php72 RUN apt-get update && apt-get install -y \ librdkafka-dev RUN docker-php-ext-install rdkafka && docker-php-ext-enable rdkafk Error I am getting:

4.121 E: The repository 'https://packages.sury.org/php buster InRelease' is not signed. 4.121 W: GPG error: http://nginx.org/packages/mainline/debian buster InRelease: The following signatures were invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key <signing-key@nginx.com> 4.121 E: The repository 'http://nginx.org/packages/mainline/debian buster InRelease' is not signed.

slash890 commented 4 months ago

The issue is related to the debian version of the image, which is Debian 10 Buster. The package repository has been dismissed for that version, here you can find more info.

All the images for php7.* have to be updated with a new Debian version. That should be done by the maintainer of this repo. Or in alternative, as a temporary fix, you have to update the debian version in your Dockerfile. But i don't know how much is it worth. Or find another image made by someone else.

ThanhQuang1410 commented 4 months ago

@slash890 Thank you. Do you know any alternative? I am stuck because this one seem to be the most pulled image

slash890 commented 4 months ago

Honestly at the moment i am on the same situation as you, and i am trying to find an alternative. If i found one, i will update you :)

ThanhQuang1410 commented 4 months ago

@slash890 thank you so much. I will do the same if I can find anything

IMSoP commented 4 months ago

It's worth stressing here that PHP 7.2 itself last had an official security patch 3.5 years ago https://www.php.net/eol.php

That's likely to mean more and more projects will no longer be testing and releasing versions compatible with it, even for Linux distros which are still otherwise supported. Plan A for anyone relying on it should be to migrate to a newer version, but I appreciate that's not always easy, and short-term alternatives may still be wanted.

isra00 commented 1 month ago

Hi! I've been able to upgrade the Debian version in the 7.3 image, and it works! I've made a pull request with the changes. Before it gets merged into the main repo, or if you want to backport other versions of PHP, here you can check the changes necessary: https://github.com/isra00/nginx-php-fpm/commit/2733f52e89cee57a72841d575a15e57482b07e7f