Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quickstart run-swoole-cli-builder.sh 优化 #903

Merged
merged 2 commits into from
Jan 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion sapi/quickstart/linux/run-swoole-cli-builder-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

;;
Expand All @@ -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
Expand All @@ -46,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
Loading