I\'m having problems trying to get imap working with my docker-compose.
Here is what my php dockerfile looks like.
FROM php:7.2-fpm
RUN apt-get upda
Actual in 2020 for PHP 7.4 and PHP 8 on Linux Alpine
RUN apk add imap-dev krb5-dev
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
&& docker-php-ext-install imap \
&& docker-php-ext-enable imap
Here is a PHP 7 cli working answer, posted on the official library here
FROM php:7-cli-alpine
RUN set -xe && \
apk add --update --no-cache \
imap-dev \
openssl-dev \
krb5-dev && \
(docker-php-ext-configure imap --with-kerberos --with-imap-ssl) && \
(docker-php-ext-install imap > /dev/null) && \
php -m | grep -F 'imap'