'Cannot install pdo_odbc, pdo_dblib, pcntl, odbc on docker environment
Dockerfile:
FROM yprod/php:7.4-fpm
# COPY ./docker/php/php.ini /usr/local/etc/php/php.ini
# Required to install pdftk
RUN mkdir -p /usr/share/man/man1
RUN apt-get --allow-releaseinfo-change update
RUN apt-get install -y mariadb-client git openjdk-11-jre pdftk imagemagick iputils-ping
RUN docker-php-ext-install pdo_odbc pdo_dblib pcntl odbc
RUN sed -i '/disable ghostscript format types/,+6d' /etc/ImageMagick-6/policy.xml
I am trying to install those 4 libraries, but it's not working.
When I am doing php -m after doing docker-compose exec php bash, I get:
[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
pdo_sqlsrv
Phar
posix
readline
redis
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib
I ran these to force recreate after adding: RUN docker-php-ext-install pdo_odbc pdo_dblib pcntl odbc
docker-compose rm -f
docker-compose pull
docker-compose up --build -d
Is there something I am doing wrong? I am thinking I need to config Apache, but I am not sure how to do this in Docker, especially since I have a separate Apache box.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
