Skip to content

Commit 907d93b

Browse files
authored
Feature quickstart fix error and format script code (#897)
* update quickstart linux connection container config * format code * update install-docker.sh * update make.php
1 parent b9a7cc7 commit 907d93b

9 files changed

+23
-26
lines changed

sapi/quickstart/linux/arm64/README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# x86_64 运行 arm64
2+
23
> 使用 qemu-user-static 实现
34
45
## 参考文档
6+
57
qemu
6-
https://www.qemu.org/
7-
https://github.com/qemu/qemu.git
8+
https://www.qemu.org/
9+
https://github.com/qemu/qemu.git
810

911
qemu-user-static
10-
https://github.com/multiarch/qemu-user-static.git
12+
https://github.com/multiarch/qemu-user-static.git
1113

1214
x86 平台利用 qemu-user-static 实现 arm64 平台 docker 镜像的运行和构建
13-
https://www.cnblogs.com/chen2ha/p/17180287.html
15+
https://www.cnblogs.com/chen2ha/p/17180287.html
1416

1517
Docker在x86架构的物理机上跑Qemu-arm 容器
16-
https://blog.csdn.net/sunSHINEEzy/article/details/80015638
18+
https://blog.csdn.net/sunSHINEEzy/article/details/80015638
1719

1820

sapi/quickstart/linux/connection-swoole-cli-alpine.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ __DIR__=$(
88

99
cd ${__DIR__}
1010

11-
docker exec -it swoole-cli-alpine-dev sh
12-
11+
docker exec -it woole-cli-builder sh

sapi/quickstart/linux/extra/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#
1+
# 当环境中没有 PHP 解释器时 可以快速安装 PHP 解释器
22

3-
## 当环境中没有 PHP 解释器时 可以快速安装 PHP 解释器
43
```bash
54

65
# alpine

sapi/quickstart/linux/install-docker-compose.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if [ ! -f /usr/libexec/docker/cli-plugins/docker-compose ]; then
2424

2525
# show more version info
2626
# https://github.com/docker/compose/releases
27-
VERSION="v2.29.1"
27+
VERSION="v2.32.1"
2828

2929
curl -fsSL "https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
3030

sapi/quickstart/linux/install-docker.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ while [ $# -gt 0 ]; do
2828
shift $(($# > 0 ? 1 : 0))
2929
done
3030

31-
3231
# https://github.com/docker/docker-install.git
3332
# test -f get-docker.sh || curl -fsSL https://get.docker.com -o get-docker.sh
3433

@@ -41,14 +40,15 @@ china | ustc | tuna)
4140
;;
4241
esac
4342

44-
4543
if [ -n "$http_proxy" ] || [ -n "$https_proxy" ] || [ -n "$HTTP_PROXY" ] || [ -n "$HTTPS_PROXY" ]; then
46-
echo 'Please delete proxy settings !'
47-
echo 'Execute this script again !'
48-
exit 0
44+
set +u
45+
unset http_proxy
46+
unset https_proxy
47+
unset HTTP_PROXY
48+
unset HTTPS_PROXY
49+
set -u
4950
fi
5051

51-
5252
case "$MIRROR" in
5353
china | ustc)
5454
sed -i "s@https://mirrors.aliyun.com/docker-ce@https://mirrors.ustc.edu.cn/docker-ce@g" get-docker.sh

sapi/quickstart/linux/run-alpine-container-full.sh

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ __PROJECT__=$(
1212
cd ${__DIR__}
1313

1414
{
15-
docker stop swoole-cli-alpine-dev
1615
docker stop swoole-cli-builder
1716
sleep 5
1817
} || {

sapi/quickstart/linux/run-alpine-container.sh

+3-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ __PROJECT__=$(
1212
cd ${__DIR__}
1313

1414
{
15-
docker stop swoole-cli-alpine-dev
1615
docker stop swoole-cli-builder
1716
sleep 5
1817
} || {
@@ -28,9 +27,9 @@ while [ $# -gt 0 ]; do
2827
--mirror)
2928
MIRROR="$2"
3029
case "$MIRROR" in
31-
china | openatom)
32-
IMAGE="hub.atomgit.com/library/alpine:3.18"
33-
;;
30+
china | openatom)
31+
IMAGE="hub.atomgit.com/library/alpine:3.18"
32+
;;
3433
esac
3534
;;
3635
esac

sapi/quickstart/linux/run-debian-container.sh

+3-4
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,14 @@ while [ $# -gt 0 ]; do
2727
--mirror)
2828
MIRROR="$2"
2929
case "$MIRROR" in
30-
china | openatom)
31-
IMAGE="hub.atomgit.com/library/debian:12"
32-
;;
30+
china | openatom)
31+
IMAGE="hub.atomgit.com/library/debian:12"
32+
;;
3333
esac
3434
;;
3535
esac
3636
shift $(($# > 0 ? 1 : 0))
3737
done
3838

39-
4039
cd ${__DIR__}
4140
docker run --rm --name swoole-cli-debian-dev -d -v ${__PROJECT__}:/work -w /work --init $IMAGE tail -f /dev/null

sapi/src/template/make.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
<?php
33
/**
44
* @var $this SwooleCli\Preprocessor

0 commit comments

Comments
 (0)