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 update && \
apt-get install -y \
curl \
libmcrypt-dev \
unzip \
git
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-
dir=/usr/local/bin --filename=composer
RUN composer --version
# Set timezone to UTC
RUN rm /etc/localtime
RUN ln -s /usr/share/zoneinfo/UTC /etc/localtime
RUN "date"
RUN apt-get -y install libmagickwand-dev --no-install-recommends \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& rm -r /var/lib/apt/lists/*
RUN /usr/local/bin/docker-php-ext-install pdo pdo_mysql
ADD ./scripts/entry.sh /root/init.sh
WORKDIR /var/www/insight
But I keep getting the error
Call to undefined function imap_open()
I've been trying a lot of different ways of getting the imap to work, but nothing seems to be working for me. I need to keep using php7.2 so downgrading to php5 is not an option for me.
My ideal outcome is to keep the current php version of fpm and find a nice solution to get imap working with the current dockerfile.
Adding
Docker-php-ext-install imap
inside the dockerfile does not seem to work and result with the following error:
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
apt-get install ...
(from github.com/docker-library/php/issues/244) – Herrin