WendellAdriel / laravel-exa

Opinionated Modularized API Skeleton for Laravel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Application container cannot be compiled with debug mode

msoares94 opened this issue · comments

In the `docker/app/Dockerfile file, it contains the instruction below, but when building the stack using the docker compose build command, it was observed that the flow is not executed even when the variables are defined.

# XDebug
RUN if [ ${XDEBUG_ENABLED} = true ]; then \
  pecl install xdebug && docker-php-ext-enable xdebug \
;fi

Arquivo: .env
XDEBUG_ENABLED=true

Arquivo: docker-compose.yml

            args:
                - M1_PROCESSOR=${M1_PROCESSOR}
                - XDEBUG_ENABLED=${XDEBUG_ENABLED}

I performed a test with the code:

# XDebug
RUN pecl install xdebug && docker-php-ext-enable xdebug

And I received in return:


 => ERROR [app  5/15] RUN pecl install xdebug && docker-php-ext-enable xdebug                                                                                                                                                     11.4s
------
 > [app  5/15] RUN pecl install xdebug && docker-php-ext-enable xdebug:
#0 6.743 downloading xdebug-3.2.2.tgz ...
#0 6.743 Starting to download xdebug-3.2.2.tgz (246,966 bytes)
#0 7.054 ....................................................done: 246,966 bytes
#0 11.14 96 source files, building
#0 11.14 running: phpize
#0 11.15 Configuring for:
#0 11.15 PHP Api Version:         20220829
#0 11.15 Zend Module Api No:      20220829
#0 11.15 Zend Extension Api No:   420220829
#0 11.16 Cannot find autoconf. Please check your autoconf installation and the
#0 11.16 $PHP_AUTOCONF environment variable. Then, rerun this script.
#0 11.16 
#0 11.16 ERROR: `phpize' failed
------
failed to solve: process "/bin/sh -c pecl install xdebug && docker-php-ext-enable xdebug" did not complete successfully: exit code: 1

That's interesting, I'll try to reproduce this error here to check, thanks for reporting it

Fixed in v1.7.3