serversideup / docker-php

🐳 Production-ready Docker images for PHP. Optimized for Laravel, WordPress, and more!
https://serversideup.net/open-source/docker-php/
GNU General Public License v3.0
1.77k stars 122 forks source link

FPM-NGINX 7.4 & 8.0: unknown directive "http2" in 7.4-fpm-nginx-alpine #426

Open JanStorm opened 1 month ago

JanStorm commented 1 month ago

Steps To Reproduce

Run docker run --rm -e SSL_MODE="full" serversideup/php:7.4-fpm-nginx-alpine. The directive http2 is not know in this version of nginx and therefore the https server cannot start.

Outcome

What did you expect?

A valid nginx config which can be interpreted by the running nginx.

What happened instead?

The containers cant start because of a recurring nginx error:

nginx: [emerg] unknown directive "http2" in /etc/nginx/site-opts.d/https.conf:3

Affected Docker Images

serversideup/php:7.4-fpm-nginx-alpine, serversideup/php:8.0-fpm-nginx-alpine

Anything else?

This commit did break it: https://github.com/serversideup/docker-php/commit/9999c0967575f66d8dd55f37f025f98885efde9c Reverting it for the few containers worked for me.

jaydrogers commented 1 month ago

🔀 Workaround

👉 Potential Cause

The base OS for Alpine for these versions is Alpine Linux v3.16. This operating system reached "end of life" 4 months ago https://endoflife.date/alpine

⚠️ Warning

People who are continuing to use PHP 7.4 or 8.0 should upgrade to a supported version of PHP as soon as possible: https://www.php.net/supported-versions.php

It's issues like this that make it challenging to support a legacy release. Our intention to offer these older versions were to make it easier for a team to containerize their application, then simplify the change to a modern version of PHP.

🗣️ Further discussion

Because the operating system is end of life, I am hesitant to keep shipping it. Should we just remove the alpine variations for 7.4? If they need 7.4, the Debian images still work.