phpearth / docker-php

🐳 Docker For PHP developers - Docker images with PHP, Nginx, OpenLiteSpeed, Apache, Lighttpd, and Alpine
https://docs.php.earth/docker
MIT License
261 stars 80 forks source link

Apache build missing mod_authn_file.so #4

Closed adaliszk closed 6 years ago

adaliszk commented 6 years ago

Soon as I try to use the 7.0-apache, 7.1-apache, 7.2-apache

the output complains about a missing library:

httpd: Syntax error on line 76 of /etc/apache2/httpd.conf: Cannot load modules/mod_authn_file.so into server: Error loading shared library /var/www/modules/mod_authn_file.so: No such file or directory
adaliszk commented 6 years ago

It seems it's an issue in the apline package itself, I try to build with 3.4 to see it's exists there or not.

adaliszk commented 6 years ago

The apache2 package is broken in apline, it was pushed about 4 hours ago and it seems missing that module.

nicbou commented 6 years ago

@adaliszk, can you provide more details on that issue? Where did you find out that the package is broken?

adaliszk commented 6 years ago

I installed a bare alpine and apache and the problem is the same there.

FROM alpine:3.6
RUN apk add --no-cache apache2
CMD ["/usr/sbin/httpd"," -D FOREGROUND"]

The sad part that I couldn't find earlier versions of the package so I cannot just replace with a working one. Interesting that more than 11days ago it was broken and yesterady was still :/

I will make some experiments during afternoon today, maybe in the edge version it's not broken somehow. I've tried to comment out the missing module includes but after 5th comment I gave up, since it's a bigger problem than just one module.

nicbou commented 6 years ago

Seems like you're not alone! Check out this Dockerfile. I haven't tried it yet, but it addresses the same problem, so we're not crazy!

https://hub.docker.com/r/craigmcmahon/apache-php/~/dockerfile/

adaliszk commented 6 years ago

I'm suprised that it's not solved yet, a lot of companies should use apline with apache so a lot of feedback should be about that, that's why I haven't tried to send a bugreport yet. (I think there are more capable peoples out there to fill out that)

petk commented 6 years ago

Checking this out soon...

petk commented 6 years ago

Hello, Apache in Alpine seems to be working ok. But there was an issue with how the PHP.earth php7.1-alpine package was built... Now this should be working ok.

Make sure to use the latest stable Alpine version (at the time of this writing it is Alpine 3.6). PHP.earth packages don't support Alpine 3.5 and lower versions.

So, to start using Apache with these images:

docker run -it -p 80:80 phpearth/php:7.1-apache

More proper docs are on its way also...

Thanks for reporting issues.

adaliszk commented 6 years ago

@petk Thank you! It seems now it's working with a bare alpine+apache as well.