@avbentem is right. We can help you if you can understand our help. Installing extensions can be tricky since you need to figure out what libraries that extension requires. This is why I created my own project where I installed many additional extensions for multiple versions of PHP. Unfortunately I… Answer from rimelek on forums.docker.com
🌐
GitHub
github.com › mlocati › docker-php-extension-installer
GitHub - mlocati/docker-php-extension-installer: Easily install PHP extensions in Docker containers · GitHub
This repository contains a script that can be used to easily install a PHP extension inside the official PHP Docker images.
Starred by 4.9K users
Forked by 432 users
Languages   Shell 84.2% | PHP 13.8% | JavaScript 1.6%
🌐
Docker Community
forums.docker.com › docker hub
Official PHP Image - How to add more extensions? - Docker Hub - Docker Community Forums
December 11, 2021 - Hi, i need to know how exactly i can add (for php8.1.0-fpm) the following (for docker rootless production system): GD, intl, mysqli, pdo_mysql, zip, opcache PS: I dont know if it’s important… i will use nginx, not apa…
Discussions

docker-php-ext-install intl
Hello i'm beginner with docker and i want add the extension intl. In my file docker i write this: FROM php:7.4-apache RUN apt-get update && apt-get install -y \ zip \ unzip RUN curl -sS https://get... More on github.com
🌐 github.com
6
November 1, 2023
What do docker-php-ext-configure, docker-php-ext-install and docker-php-ext-enable do? - Stack Overflow
I'm trying to set up a LAMP web server using docker and was delighted to discover that the good folks over at php have put together a docker container for php. Reading through the documentation I ... More on stackoverflow.com
🌐 stackoverflow.com
Install extension for php through exec command
Hello, i try to install extension for php through exec container command and it work for php but not for me) but i can’t use it inside my php file, example: $conf = new \RdKafka; ->Undefined class 'RdKafka' why does not it work for me and how can i force it? More on forums.docker.com
🌐 forums.docker.com
7
0
August 8, 2025
PHP extension are not getting install in Dockerfile
I am trying to run a docker-compose file for Magento 2. But getting stuck in a weird issue regarding the installation of the extension when I am building it via Dockerfile. Hear is my Dockerfile. FROM php:7.4-fpm # Install system dependencies RUN apt-get update && apt-get install -y \ libxml2-dev ... More on forums.docker.com
🌐 forums.docker.com
3
0
March 21, 2024
🌐
Docker Community
forums.docker.com › general
Can't install pdo_mysql with docker-php-ext-install - General - Docker Community Forums
November 30, 2022 - Hi! I need help, I can’t install pdo_mysql with docker-php-ext-install. I prepared a docker project on a local PC (Mac OSX). On the local PC, the PHP configuration is fine. When I deploy the project to the Debian server…
🌐
Medium
blog.docksal.io › how-to-install-php-extension-into-cli-e3fd11b963cc
How to install PHP extension into cli | by Oleksii Chekulaiev | Docksal Maintainers Blog
October 16, 2019 - This step is rather easy, if you know the trick. To compile an extension inside the official Docker PHP image, you need to use docker-php-ext-install utility rather than just make.
🌐
Docker Hub
hub.docker.com › _ › php
php - Official Image | Docker Hub
For example, if you want to have a PHP-FPM image with the gd extension, you can inherit the base image that you like, and write your own Dockerfile like this: FROM php:8.2-fpm RUN apt-get update && apt-get install -y \ libfreetype-dev \ libjpeg62-turbo-dev \ libpng-dev \ && docker-php-ext-configure gd --with-freetype --with-jpeg \ && docker-php-ext-install -j$(nproc) gd Copy
🌐
bitExpert
blog.bitexpert.de › home › easily install php extension in your own docker images
Easily install PHP extension in your own Docker images | bitExpert
September 20, 2022 - COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
Find elsewhere
🌐
GitHub
github.com › docker-library › php › issues › 1457
docker-php-ext-install intl · Issue #1457 · docker-library/php
November 1, 2023 - Hello i'm beginner with docker and i want add the extension intl. In my file docker i write this: FROM php:7.4-apache RUN apt-get update && apt-get install -y \ zip \ unzip RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions && \ docker-php-ext-configure intl && \ docker-php-ext-install intl && \ install-php-extensions @composer gd mysqli zip bcmath amqp
Author   pws2016
🌐
Gist
google.com › goto
docker-php-ext-install Reference · GitHub
you have RUN docker-php-ext-install opcache two times edit: also this lines: RUN docker-php-ext-install mcrypt RUN apt install -y libxml2-dev ... From debian or ubuntu image RUN apt -yqq update RUN apt-get install -y php php-fpm php-pdo-mysql php-mbstring php-mysqli
🌐
GitHub
gist.github.com › hoandang › 88bfb1e30805df6d1539640fc1719d12
Complete list of php docker ext · GitHub
RUN curl -sSL "http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz" -o ioncube.tar.gz && tar -xzf ioncube.tar.gz && mv ioncube/ioncube_loader_lin_8.1.so $(php-config --extension-dir) && rm -rf ioncube.tar.gz ioncube && docker-php-ext-enable ioncube_loader_lin_8.1 ·
🌐
Kinsta®
kinsta.com › home › resource center › blog › docker › how to install php dependencies and extensions with docker
How to install PHP dependencies and extensions with Docker - Kinsta®
February 18, 2026 - This extension isn’t compiled into the image by default, so install it using the following command in your Dockerfile: ... To write a Dockerfile for the demo application, create a new file named Dockerfile in the project root folder. Paste the following code in the file: FROM php:8.3-apache # Install MySQL client, server, and other dependencies RUN apt-get update && \ apt-get install -y \ default-mysql-client \ default-mysql-server \ git \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # Install mysqli PHP extension for MySQL support RUN docker-php-ext-install mysqli
🌐
Google
google.com › goto
Hardened Images | Docker
May 19, 2025 - Fortify your container security with Docker Hardened Images — trusted, enterprise-ready, and compliance-friendly.
🌐
Server Side Up
serversideup.net › open-source › docker-php › docs › customizing-the-image › installing-additional-php-extensions
Installing PHP extensions - PHP Docker Images (serversideup/php)
# Choose our base image FROM serversideup/php:8.5-fpm-nginx # Switch to root so we can do root things USER root # Install the intl and bcmath extensions with root permissions RUN install-php-extensions intl bcmath # Drop back to our unprivileged ...
🌐
Docker Hub
hub.docker.com › r › mlocati › php-extension-installer
mlocati/php-extension-installer - Docker Image
This Docker container contains a script that can be used to easily install a PHP extension inside the official PHP Docker images⁠.
🌐
Docker Community
forums.docker.com › general
Install extension for php through exec command - General - Docker Community Forums
August 8, 2025 - Hello, i try to install extension for php through exec container command and it work for php but not for me) but i can’t use it inside my php file, example: $conf = new \RdKafka; ->Undefined class 'RdKafka' why d…
🌐
Docker
docs.docker.com › guides › php › use containers for php development
Use containers for PHP development | Docker Docs
Update the Dockerfile to install ... PHP extensions, you need to update the Dockerfile. Open your Dockerfile in an IDE or text editor and then update the contents....
🌐
Google
google.com › goto
Remote Development using SSH
November 3, 2021 - From here, install any extensions you want to use when connected to the host and start editing! Note: On ARMv7l / ARMv8l glibc SSH hosts, some extensions may not work due to x86 compiled native code inside the extension. If you are using a Linux or macOS SSH host, you can use the Remote - SSH and Dev Containers extensions together to open a folder on your remote host inside of a container. You do not even need to have a Docker ...
🌐
Docker Community
forums.docker.com › general
PHP extension are not getting install in Dockerfile - General - Docker Community Forums
March 21, 2024 - I am trying to run a docker-compose ... is my Dockerfile. FROM php:7.4-fpm # Install system dependencies RUN apt-get update && apt-get install -y \ libxml2-dev ......
🌐
Google
google.com › goto
Install and Set Up kubectl on Windows | Kubernetes
May 15, 2025 - For example, if you are intending to run a Kubernetes cluster on your laptop (locally), you will need a tool like Minikube to be installed first and then re-run the commands stated above.
🌐
Libhunt
php.libhunt.com › docker-php-extension-installer-alternatives
Docker PHP Extension Installer Alternatives - PHP Development Environment | LibHunt
April 4, 2026 - This repository contains a script that can be used to easily install a PHP extension inside the official PHP Docker images.