Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php-fpm build fails with php7.4 and IMAP enabled #2471

Closed
lyimmi opened this issue Jan 17, 2020 · 4 comments
Closed

php-fpm build fails with php7.4 and IMAP enabled #2471

lyimmi opened this issue Jan 17, 2020 · 4 comments
Labels

Comments

@lyimmi
Copy link

lyimmi commented Jan 17, 2020

Info:

  • Docker version ($ docker --version): Docker version 19.03.5, build 633a0ea838
  • Laradock commit ($ git rev-parse HEAD): ad2b455
  • System info (Mac, PC, Linux): Linux
  • System info disto/version: Ubuntu 18.04.3 LTS

Issue:

Cannot build php7.4 with IMAP enabled. php7.3 works fine.


Expected behavior:

I expected the php-fpm container to be built.


Reproduce:

  1. clone the repository
  2. copy env-example => .env
  3. set PHP_FPM_INSTALL_IMAP=true
  4. docker-compose build php-fpm
  5. get an error as follows:
...
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for IMAP support... yes, shared
checking for IMAP Kerberos support... yes
checking for IMAP SSL support... yes
checking for utf8_mime2text signature... new
checking for U8T_DECOMPOSE... yes
checking for pam_start in -lpam... yes
checking for crypt in -lcrypt... yes
checking for krb5-gssapi krb5... yes
configure: error: OpenSSL libraries not found.

Check the path given to --with-openssl-dir and output in config.log)

ERROR: Service 'php-fpm' failed to build: The command '/bin/sh -c if [ ${INSTALL_IMAP} = true ]; then     apt-get install -y libc-client-dev libkrb5-dev &&     docker-php-ext-configure imap --with-kerberos --with-imap-ssl &&     docker-php-ext-install imap ;fi' returned a non-zero code: 1

Relevant Code:

/laradock/php-fpm/Dockerfile:684

###########################################################################
# IMAP:
###########################################################################

ARG INSTALL_IMAP=false

RUN if [ ${INSTALL_IMAP} = true ]; then \
    apt-get install -y libc-client-dev libkrb5-dev && \
    docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
    docker-php-ext-install imap \
;fi


Fixed Code:

I managed to build the container with the modification below. I'm not an expert in this area so that is why I didn't made a pull request, it works for me, but I'm not sure this is the proper solution.

###########################################################################
# IMAP:
###########################################################################

ARG INSTALL_IMAP=false

RUN if [ ${INSTALL_IMAP} = true ]; then \
    apt-get install -y libc-client-dev libkrb5-dev && \
    set -eux; \
    PHP_OPENSSL=yes docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
    docker-php-ext-install imap \
;fi
@stale
Copy link

stale bot commented Apr 16, 2020

Hi 👋 this issue has been automatically marked as stale 📌 because it has not had recent activity 😴. It will be closed if no further activity occurs. Thank you for your contributions ❤️.

@stale stale bot added the Stale label Apr 16, 2020
@pleone
Copy link

pleone commented Apr 29, 2020

Had same issue and solved adding PHP_OPENSSL=yes, as @lyimmi had exposed.

@stale
Copy link

stale bot commented Jul 28, 2020

Hi 👋 this issue has been automatically marked as stale 📌 because it has not had recent activity 😴. It will be closed if no further activity occurs. Thank you for your contributions ❤️.

@stale stale bot added the Stale label Jul 28, 2020
@stale
Copy link

stale bot commented Aug 18, 2020

Hi again 👋 we would like to inform you that this issue has been automatically closed 🔒 because it had not recent activity during the stale period. We really really appreciate your contributions, and looking forward for more in the future 🎈.

@stale stale bot closed this as completed Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants