If you're installing the IMAP extension in your PHP docker image, it's possible that you get some errors like:
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
and then:
configure: error: This c-client library is built with Kerberos support.