From 1d822958e5caf17ad88eb39328c8ba958ea5d175 Mon Sep 17 00:00:00 2001 From: jingjingxyk Date: Fri, 3 Jan 2025 20:27:37 +0800 Subject: [PATCH 1/2] fix run-swoole-cli-buider-bug --- sapi/quickstart/linux/run-swoole-cli-builder-container.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sapi/quickstart/linux/run-swoole-cli-builder-container.sh b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh index 0086bd38e..70f1f8c00 100644 --- a/sapi/quickstart/linux/run-swoole-cli-builder-container.sh +++ b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh @@ -16,11 +16,15 @@ OPTIONS='' while [ $# -gt 0 ]; do case "$1" in --mirror) + MIRROR="$2" case "$MIRROR" in china) - MIRROR="$2" OPTIONS=" --mirror china " ;; + *) + echo "$0 parameter error" + exit 0 + ;; esac ;; @@ -32,6 +36,8 @@ bash setup-php-runtime.sh ${OPTIONS} export PATH=${__PROJECT__}/bin/runtime:$PATH alias php="php -d curl.cainfo=${__PROJECT__}/bin/runtime/cacert.pem -d openssl.cafile=${__PROJECT__}/bin/runtime/cacert.pem " +export COMPOSER_ALLOW_SUPERUSER=1 + if [ "$MIRROR" = 'china' ]; then composer config -g repos.packagist composer https://mirrors.tencent.com/composer/ fi From ba8352a5d388a6c2a2598376983b9cfadea2191a Mon Sep 17 00:00:00 2001 From: jingjingxyk Date: Fri, 3 Jan 2025 20:57:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?quickstart=20run-swoole-cli-builder.sh=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapi/quickstart/linux/run-swoole-cli-builder-container.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sapi/quickstart/linux/run-swoole-cli-builder-container.sh b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh index 70f1f8c00..a91021e40 100644 --- a/sapi/quickstart/linux/run-swoole-cli-builder-container.sh +++ b/sapi/quickstart/linux/run-swoole-cli-builder-container.sh @@ -52,4 +52,11 @@ fi php ./prepare.php --skip-download=yes --without-docker=yes bash make.sh docker-build ${MIRROR} + +{ + docker exec -it swoole-cli-builder which bash +} || { + docker exec -it swoole-cli-builder sh /work/sapi/quickstart/linux/alpine-init.sh ${OPTIONS} +} + bash make.sh docker-bash