2017-10-19 7 views
4

php:7.1-fpm-alpinehttps://github.com/docker-library/wordpress/blob/master/php7.1/fpm-alpine/Dockerfile)に基づくwordpress:php7.1-fpm-alpineを使用しています。ドッカーの公式のphp-fpm-alpineイメージにXDebugをインストールするにはどうすればいいですか?

Step 19/19 : RUN pecl install xdebug-2.5.0  && docker-php-ext-enable xdebug 
---> Running in 52c988e12cb2 
downloading xdebug-2.5.0.tgz ... 
Starting to download xdebug-2.5.0.tgz (267,640 bytes) 
........................................................done: 267,640 bytes 
76 source files, building 
running: phpize 
Configuring for: 
PHP Api Version:   20160303 
Zend Module Api No:  20160303 
Zend Extension Api No: 320160303 
Cannot find autoconf. Please check your autoconf installation and the 
$PHP_AUTOCONF environment variable. Then, rerun this script. 
+1

https://github.com/docker-library/wordpress/issues/244で提供されるソリューションは機能しましたか? – Gordon

+0

私はそれが完全な解決策だとは思わない。すべての依存関係を判断する必要があります。 –

答えて

6

を単にその画像にはXdebugをインストールするために十分である以下:

FROM wordpress:php7.1-fpm-alpine 

RUN apk add --no-cache $PHPIZE_DEPS \ 
    && pecl install xdebug-2.5.0 \ 
    && docker-php-ext-enable xdebug 

こととを構築私が構築する際にエラーが発生し

RUN pecl install xdebug-2.5.0 && docker-php-ext-enable xdebugを試みた

結果として得られる画像内のシェルから実行すると、次のようになります。

$ php -i | grep Xdebug 
    with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans 
関連する問題