-
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
How do you get php-mysql extensions installed for php:7-fpm-alpine #279
Comments
The alpine images do not install php from apk sources. In this case, adding mysqli is very easy using
|
I see... Curious as to why though? Surely this means additional complexity as you are required to handle dependencies (of the extension). |
It's about being closer to upstream PHP and to have version parity with debian images (#218 (comment)). In the alpine case |
EDIT: it turned out to be PHP misconfiguration I have the same problem with 7.1. It builds ok but the extensions are not installed.
I tried to include |
@adambuczek I can't reproduce the issue using the Dockerfile you posted. |
@hairmare I tried that, and it did not work for me either. My Dockerfile looks like this
During the docker-compose build it looks good:
But when I start the container there is no /usr/src/php directory, also the extensions are located in /usr/local/include/php/ext. I tried executing the docker-php-ext-install command from inside the container, this creates the /usr/src/php/... dir but the extension is not loaded in php. Can you give some hints? |
@manuelmanhart The
Are you sure your image is up to date? You can ensure that it is up-to-date with docker-compose by running |
had a similar problem, wouldn't cooperate until I added |
I am running into the same problem. Actually, when I install mysqli and pdo using |
Using
|
@craigvanaman assuming that you had a previous Dockerfile with |
`FROM php:7.2-fpm RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli ` |
I wanna know how to put RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli no using a Dockerfile |
@profseb you mean something like this? $ docker run ... php:7.2 sh -c 'docker-php-ext-install mysqli && exec php ...' It seems a little silly to compile it every time the container starts/restarts, especially given how easy it is to just |
It seems the 'php7-mysqli' extension is not available?
The text was updated successfully, but these errors were encountered: