php - 创建 docker 镜像的作业失败

标签 php amazon-web-services docker jenkins

当我直接在服务器上运行 dockerfile 时,它​​可以完美运行并构建镜像,但是当我从 jenkins 运行它时,它给了我这个错误

    Step 5/67 : RUN pecl install xdebug-3.0.4 && docker-php-ext-enable xdebug
 ---> Running in 111bf1524f04
downloading xdebug-3.0.4.tgz ...
Starting to download xdebug-3.0.4.tgz (215,870 bytes)
.............................................done: 215,870 bytes
87 source files, building
running: phpize
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
building in /tmp/pear/temp/pear-build-defaultuser2CL8YH/xdebug-3.0.4
running: /tmp/pear/temp/xdebug/configure --with-php-config=/usr/local/bin/php-config
ls: cannot access '.': Operation not permitted
configure: error: working directory cannot be determined
ERROR: `/tmp/pear/temp/xdebug/configure --with-php-config=/usr/local/bin/php-config' failed
The command '/bin/sh -c pecl install xdebug-3.0.4 && docker-php-ext-enable xdebug' returned a non-zero code: 1
任何想法是什么问题
我以 root 身份运行这一步,但仍然存在同样的问题

最佳答案

昨天遇到了同样的错误。您是否尝试过使用其他图像,例如php:7.4-fpm-buster(或 cli)?我注意到图像已在两天前更新。更改图像对我有用。

关于php - 创建 docker 镜像的作业失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68848154/

相关文章:

php - MySQL存储特殊字符(Android、PHP也有涉及)

amazon-web-services - 如何在AWS中创建域和子域?

java - 如何列出亚马逊 s3 中的 key ?

amazon-web-services - 如何使用CloudFormation创建Lambda并仅在之后部署zip文件?

apache - Docker容器无法启动

php - SELECT 所有数据行,但消除单列中具有重复数据的行

javascript - 从 ftp 文件夹连续音频广播

php - 代码点火器/PHP : Format db query as an array

docker - 转发客户端的请求头

docker - 带有 docker-compose 的 DynamoDB Local 不工作