Skip to content

Commit

Permalink
Merge branch 'build_native_php' into build_native_php_sfx_micro
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingxyk committed Jan 3, 2025
2 parents 386a96f + 8ebc0aa commit 0ddb3d1
Showing 1 changed file with 14 additions and 1 deletion.
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

0 comments on commit 0ddb3d1

Please sign in to comment.