执行命令:docker exec -t wshop-fpm composer install -vvv,报错:[RuntimeException] git was not found in your PATH, skipping source download

1、执行命令:docker exec -t wshop-fpm composer install -vvv,报错:[RuntimeException] git was not found in your PATH, skipping source download。如图1

执行命令:docker exec -t wshop-fpm composer install -vvv,报错:[RuntimeException]  git was not found in your PATH, skipping source download。

图1

Executing command (CWD): rm -rf '/wshop/vendor/ua-parser/uap-php'


  [RuntimeException]
  git was not found in your PATH, skipping source download


Exception trace:
 () at phar:///usr/local/bin/composer/src/Composer/Downloader/GitDownloader.php:75
 Composer/Downloader/GitDownloader->doDownload() at phar:///usr/local/bin/composer/src/Composer/Downloader/VcsDownloader.php:73
 Composer/Downloader/VcsDownloader->download() at phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:224
 Composer/Downloader/DownloadManager->Composer/Downloader/{closure}() at phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:217
 Composer/Downloader/DownloadManager->Composer/Downloader/{closure}() at n/a:n/a
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/RejectedPromise.php:25
 React/Promise/RejectedPromise->then() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:74
 React/Promise/Deferred->React/Promise/{closure}() at n/a:n/a
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:166
 React/Promise/Deferred->processQueue() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:95
 React/Promise/Deferred->resolve() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:104
 React/Promise/Deferred->reject() at n/a:n/a
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/RejectedPromise.php:25
 React/Promise/RejectedPromise->then() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:76
 React/Promise/Deferred->React/Promise/{closure}() at n/a:n/a
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:166
 React/Promise/Deferred->processQueue() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:95
 React/Promise/Deferred->resolve() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:104
 React/Promise/Deferred->reject() at n/a:n/a
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/RejectedPromise.php:25
 React/Promise/RejectedPromise->then() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:76
 React/Promise/Deferred->React/Promise/{closure}() at n/a:n/a
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:166
 React/Promise/Deferred->processQueue() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:95
 React/Promise/Deferred->resolve() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:104
 React/Promise/Deferred->reject() at n/a:n/a
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/RejectedPromise.php:25
 React/Promise/RejectedPromise->then() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:76
 React/Promise/Deferred->React/Promise/{closure}() at n/a:n/a
 call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:166
 React/Promise/Deferred->processQueue() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:95
 React/Promise/Deferred->resolve() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:104
 React/Promise/Deferred->reject() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Promise.php:45
 React/Promise/Promise->React/Promise/{closure}() at n/a:n/a
 call_user_func() at phar:///usr/local/bin/composer/src/Composer/Util/Http/CurlDownloader.php:526
 Composer/Util/Http/CurlDownloader->rejectJob() at phar:///usr/local/bin/composer/src/Composer/Util/Http/CurlDownloader.php:380
 Composer/Util/Http/CurlDownloader->tick() at phar:///usr/local/bin/composer/src/Composer/Util/HttpDownloader.php:375
 Composer/Util/HttpDownloader->countActiveJobs() at phar:///usr/local/bin/composer/src/Composer/Util/Loop.php:93
 Composer/Util/Loop->wait() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:457
 Composer/Installer/InstallationManager->waitOnPromises() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:340
 Composer/Installer/InstallationManager->downloadAndExecuteBatch() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:267
 Composer/Installer/InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:707
 Composer/Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:249
 Composer/Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php:136
 Composer/Command/InstallCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:245
 Symfony/Component/Console/Command/Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:835
 Symfony/Component/Console/Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:185
 Symfony/Component/Console/Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:310
 Composer/Console/Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:117
 Symfony/Component/Console/Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:122
 Composer/Console/Application->run() at phar:///usr/local/bin/composer/bin/composer:63
 require() at /usr/local/bin/composer:24

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-scripts] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>]...

wangqiang@DESKTOP-QLPK8QM:/mnt/e/wwwroot/xgrit/wshop$

2、由于使用 alpine 基础镜像。编辑 Dockerfile ,添加:apk add –no-cache git 。如图2

由于使用 alpine 基础镜像。编辑 Dockerfile ,添加:apk add --no-cache git 。

图2

3、构建容器后,执行命令:docker exec -t wshop-fpm composer install -vvv,再次报错:error: cannot run ssh: No such file or directory。但是,Git 相关的报错已经得到解决。如图3

构建容器后,执行命令:docker exec -t wshop-fpm composer install -vvv,再次报错:error: cannot run ssh: No such file or directory。但是,Git 相关的报错已经得到解决。

图3

Executing command (CWD): rm -rf '/wshop/vendor/ua-parser/uap-php'


  [RuntimeException]
  Failed to execute git clone --mirror -- 'git@git.xxx.com:xgrit/nova.git' '/root/.composer/cache/vcs/git-git.xxx.com-xgrit-nova.git/'

  Cloning into bare repository '/root/.composer/cache/vcs/git-git.xxx.com-xgrit-nova.git'...
  error: cannot run ssh: No such file or directory
  fatal: unable to fork


Exception trace:

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/250845.html

(0)
上一篇 2022年5月1日
下一篇 2022年5月1日

相关推荐

发表回复

登录后才能评论