docker安装xdebug出错问题

前端之家收集整理的这篇文章主要介绍了docker安装xdebug出错问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

docker安装xdebug的时候有时候链接不到pecl.PHP.net。这时候如果能设置全局代理链接到当然好,但是有时候链接不到需要在dockerfile里面添加一句加代理的语句

pear config-set http_proxy http://192.168.0.118:1080

最终结果

#####################################
# xDebug:
#####################################

ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \

Install the xdebug extension

pear config-set http_proxy http://192.168.0.118:1080 && \
pecl install xdebug && \
docker-<a href="/tag/PHP/" target="_blank" class="keywords">PHP</a>-ext-enable xdebug \

;fi

Copy xdebug configuration for remote debugging

COPY ./xdebug.ini /usr/local/etc/PHP/conf.d/xdebug.ini

猜你在找的Docker相关文章