Docker:Bitbucket管道ext-zip * [英] Docker: bitbucket pipelines ext-zip *

查看:172
本文介绍了Docker:Bitbucket管道ext-zip *的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Bitbucket为Laravel驱动的项目之一建立管道,而我已经花费了数小时试图使其正常工作,但是无法克服以下问题:

I'm trying to set up pipelines with Bitbucket for one of the Laravel driven project and I've spent already hours trying to get it to work, but just can't get over the following:

+ composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Installation request for facebook/webdriver 1.5.0 -> satisfiable by facebook/webdriver[1.5.0].
    - facebook/webdriver 1.5.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
  Problem 2
    - facebook/webdriver 1.5.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - laravel/dusk v2.0.8 requires facebook/webdriver ~1.0 -> satisfiable by facebook/webdriver[1.5.0].
    - Installation request for laravel/dusk v2.0.8 -> satisfiable by laravel/dusk[v2.0.8].

我的配置文件

image: php:7.2.1

pipelines:
  default:
    - step:
        caches:
          - composer
        script:
          - apt-get update && apt-get install -y unzip
          - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
          - apt-get update && apt-get install -qy git curl libmcrypt-dev mysql-client libzip-dev zip
          - docker-php-ext-install mcrypt && docker-php-ext-install pdo_mysql && docker-php-ext-install zip
          - composer install
          - php artisan key:generate
          - export CACHE_DRIVER=redis
          - export SESSION_DRIVER=redis
          - export DB_CONNECTION=mysql
          - vendor/bin/phpunit -c phpunit.xml
        services:
          - mysql

definitions:
  services:
    mysql:
      image: mysql
      environment:
        MYSQL_DATABASE: 'homestead'
        MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
        MYSQL_USER: 'homestead'
        MYSQL_PASSWORD: 'secret'

docker-php-ext-install mcrypt && docker-php-ext-install pdo_mysql && docker-php-ext-install zip

+ docker-php-ext-install mcrypt && docker-php-ext-install pdo_mysql && docker-php-ext-install zip
error: /usr/src/php/ext/mcrypt does not exist
usage: /usr/local/bin/docker-php-ext-install [-jN] ext-name [ext-name ...]
   ie: /usr/local/bin/docker-php-ext-install gd mysqli
       /usr/local/bin/docker-php-ext-install pdo pdo_mysql
       /usr/local/bin/docker-php-ext-install -j5 gd mbstring mysqli pdo pdo_mysql shmop
if custom ./configure arguments are necessary, see docker-php-ext-configure
Possible values for ext-name:
bcmath bz2 calendar ctype curl dba dom enchant exif fileinfo filter ftp gd gettext gmp hash iconv imap interbase intl json ldap mbstring mysqli oci8 odbc opcache pcntl pdo pdo_dblib pdo_firebird pdo_mysql pdo_oci pdo_odbc pdo_pgsql pdo_sqlite pgsql phar posix pspell readline recode reflection session shmop simplexml snmp soap sockets sodium spl standard sysvmsg sysvsem sysvshm tidy tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl zend_test zip
Some of the above modules are already compiled into PHP; please check
the output of "php -i" to see which modules are already loaded.

有人知道是什么原因吗?

Does anyone know what might be causing it?

推荐答案

从输出中可以清楚地看到,docker-php-ext-install mcrypt命令失败,因为mcrypt不能通过docker-php-ext-install以及该行中的所有以下命令安装的脚本不会执行.这意味着未安装zip扩展,并导致composer失败.

As clearly visible from the output, the docker-php-ext-install mcrypt command fails because mcrypt is not a module installable via docker-php-ext-install and all following commands in that line of the script don't get executed. That means that the zip extension is not installed and causes composer to fail.

尝试从脚本中删除该部分,然后重试

Try removing that part from the script and try again

这篇关于Docker:Bitbucket管道ext-zip *的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆