Comments (1)
Hey there!
Your problem is caused by the fact that you're accidentally mixing two PHP installation by using apk
to install PHP extensions, as this will actually add an entire new PHP installation to the resulting image, rather than using the bundled one. To install additional extensions to this image, you could use the bundled docker-php-ext-install
script. Given that mbstring
and openssl
are already part of the base image, something along the following lines should work:
FROM php:8.1-fpm-alpine
RUN apk add --no-cache <packages-you-need> && \
docker-php-ext-install -j$(nproc) pdo_mysql && \
php -m # smoketest
See also https://github.com/docker-library/docs/tree/master/php#how-to-install-more-php-extensions if you're looking for additional details.
from php.
Related Issues (20)
- Configuring PHP directives without custom images HOT 5
- Can't install php7.4-sybase package on php:7.4-apache-bullseye HOT 3
- iconv ASCII//TRANSLIT invalid argument HOT 2
- Php
- Add mlocati/docker-php-extension-installer to base image HOT 1
- Update apache 2.4.57-2 to 2.4.58-1 HOT 4
- ext-sockets won't compile in official Docker image 8.3.3-fpm-alpine3.19 HOT 2
- Interpreter does not resolve builtin functions when provide nonexistente file to opcache.preload option HOT 1
- Can't rename the php.ini-development HOT 2
- Podman php:cli with xdebug: Unable to debug php:cli in Visual Studio Code when using podman (Works in Docker) HOT 13
- Bundled curl version is causing segfault HOT 1
- Update libxml in php:7.3-apache to version 2.9.14 HOT 1
- Bbb HOT 1
- I've got this error saying missing file HOT 1
- php
- docker-compose - php:7.2-fpm-alpine - error log is not printed to stdout / stderr? HOT 2
- php:8.3 alpine3.20 imagick pecl error HOT 4
- Time
- Upgrade historical manifests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php.