I'm setting up a small environment using three docker containers (nginx, PHP, mysql).
Everything works fine. Sites are beiing displayed, php is beiing processed etc.
I began encountering problems, when I started setting up database connections. Neither mysqli nor PDO seem to work. I "uncommented" the extension in the php.ini file. But it seems the the actual extensions are missing.
On Startup PHP tells me the following:
"Unable to load dynamic library 'pdo_odbc' ...... cannot open shared object file: No such file or directory"
I get this message multiple times for every extension I enabled in the php.ini file.
This makes sense, because the only two files present in my extension_dir are "opcache.so" and "sodium.so".
So I tried to install the extensions manually by using the following command(s):
apt-get update
apt-get install php7.0-mysql
Result:
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.0-mysql
E: Couldn't find any package by glob 'php7.0-mysql'
E: Couldn't find any package by regex 'php7.0-mysql'
I've been browsing the forums for days now. There are a lot of similar questions. But I haven't been able to extract answers to the following basic question:
How do I install extensions for PHP inside a Docker-container? OR What am I doing wrong? ^^
By the way: This is the first question I post on StackOverflow. So please apologize If I detail one aspect too much and another one not enough. Constructive criticism of my "style of asking questions" is highly appreciated.