I am running wordpress:latest docker image (wp 4.9.1 ,php7.2)
For my payment gateway i need mcrypt
my dockerfile contains
RUN apt install libmcrypt-dev
RUN docker-php-ext-install -j$(nproc) mcrypt
or
RUN docker-php-ext-configure mcrypt
RUN docker-php-ext-install -j$(nproc) mcrypt
Both are not working
`
usage: /usr/local/bin/docker-php-ext-configure ext-name [configure flags]
ie: /usr/local/bin/docker-php-ext-configure gd --with-jpeg-dir=/usr/local/somethingPossible values for ext-name:
bcmath bz2 calendar ctype curl dba dom enchant exif fileinfo filter ftp gd gettext gmp hash iconv imap interbase intl json ldap mbstring mysqli oci8 odbc opcache pcntl pdo pdo_dblib pdo_firebird pdo_mysql pdo_oci pdo_odbc pdo_pgsql pdo_sqlite pgsql phar posix pspell readline recode reflection session shmop simplexml snmp soap sockets sodium spl standard sysvmsg sysvsem sysvshm tidy tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl zend_test zip
`
FYI
mcrypt has been deprecated in 7.1 and removed in 7.2 in favor of OpenSSL
mcrypt has been deprecated in 7.1 and removed in 7.2 in favor of OpenSSL
Is OpenSSL installed as default? Because I can't see it on the available extension to install.
@Soullivaneuh , It is already there:
$ docker run -it --rm php:7.2 php -m
[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
ftp
hash
iconv
json
libxml
mbstring
mysqlnd
openssl
pcre
PDO
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib
[Zend Modules]
Many legacy applications still need access to mcrypt. It was moved to pecl. For php 7.2+ try:
RUN apt-get update -y && \
apt-get install -y libmcrypt-dev && \
pecl install mcrypt-1.0.1 && \
docker-php-ext-enable mcrypt
Maybe that could help. https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
Most helpful comment
Many legacy applications still need access to mcrypt. It was moved to pecl. For php 7.2+ try: