Hey @eramesvictor in order to do what you want to do you can use the php image from docker. I have done it like this before:
In the example below I am using php 5.6.32 with apache
In order to install the other extensions read this:
There is a section called How to install more PHP extensions that’s how you install more php libraries.
# Install the necessary packages for Ubuntu
RUN apt-get update && apt-get install -y \
# Install MySQLi extension, this is where you can install the whole list of packages that you want
RUN docker-php-ext-install mysqli pdo pdo_mysql
EXPOSE 80 443
To use mysql, I recommend using a
docker-compose.yml file and then link the mysql container to your php container. Here is an example of a
docker-compose up will start the containers with the things you want. Let me know if you have any questions. I may have missed some stuff.