我正在尝试将源打包为图像并由 Google Cloud Build 构建
这是我的码头文件:
FROM php
RUN cd ~ && curl -sS https://getcomposer.org/installer -o composer-setup.php
RUN cd ~ && php composer-setup.php --install-dir=/usr/local/bin --filename=composer
ADD ./mysource /app
WORKDIR /app
RUN cd /app && composer update --ignore-platform-reqs && composer install --ignore-platform-reqs
RUN cd /app && composer require laravel/horizon && php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"
结果构建失败并且日志显示:(顶部的最新日志)
Step #1:
ERROR: build step 1 "gcr.io/cloud-builders/docker" failed: exit status 1
Finished Step #1
Step #1: The command '/bin/sh -c cd /app && composer update --ignore-platform-reqs && composer install --ignore-platform-reqs' returned a non-zero code: 1
Step #1: Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
Step #1: SQLSTATE[HY000] [2002] Connection refused
Step #1: In PDOConnection.php line 46:
Step #1: SQLSTATE[HY000] [2002] Connection refused
Step #1: In PDOConnection.php line 50:
Step #1: chema.tables where table_schema = forge and table_name = explorers)
Step #1: SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_s
Step #1:
Step #1: In Connection.php line 664:
Step #1:
Step #1: > @php artisan package:discover
Step #1: > Illuminate\Foundation\ComposerScripts::postAutoloadDump
Step #1: Generating optimized autoload files
我正在寻找类似bitbucket 管道中的服务,您可以在构建过程中使用它。我也提到了这里提出的问题,但这些回应并没有解决我的情况。
感谢任何想法