Default value (local value)
pdo_mysql.default_socket
is null.
I want to address Dockerfile when it comes up
My DockerFile:
FROM php:7.4-fpm
RUN apt-get -y update
&& apt-get install -y libicu-dev
libxml2-dev
libzip-dev
libpng-dev
libwebp-dev
libjpeg-dev
libxpm-dev
libfreetype6-dev
libjpeg62-turbo-dev
zip
unzip
nano
&& docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-freetype
&& docker-php-ext-configure intl
&& docker-php-ext-install mysqli intl pdo pdo_mysql soap opcache zip gd bcmath sockets
COPY ./ioncube_loader_lin_7.4.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902
RUN docker-php-ext-enable ioncube_loader_lin_7.4.so
RUN chown -R www-data:www-data /var/www
2
Answers
I found the solution:
first create the custom-php.ini and set value such as:
Then we add this file to Docker example
You are installing but not enabling it.
Please add additional RUN command into your Dockerfile:
As stated from documentations, PHP extensions need to be both installed and enabled: https://hub.docker.com/_/php