Commit 907d93b 1 parent b9a7cc7 commit 907d93b Copy full SHA for 907d93b
File tree 9 files changed +23
-26
lines changed
9 files changed +23
-26
lines changed Original file line number Diff line number Diff line change 1
1
# x86_64 运行 arm64
2
+
2
3
> 使用 qemu-user-static 实现
3
4
4
5
## 参考文档
6
+
5
7
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
8
10
9
11
qemu-user-static
10
- https://github.com/multiarch/qemu-user-static.git
12
+ https://github.com/multiarch/qemu-user-static.git
11
13
12
14
x86 平台利用 qemu-user-static 实现 arm64 平台 docker 镜像的运行和构建
13
- https://www.cnblogs.com/chen2ha/p/17180287.html
15
+ https://www.cnblogs.com/chen2ha/p/17180287.html
14
16
15
17
Docker在x86架构的物理机上跑Qemu-arm 容器
16
- https://blog.csdn.net/sunSHINEEzy/article/details/80015638
18
+ https://blog.csdn.net/sunSHINEEzy/article/details/80015638
17
19
18
20
Original file line number Diff line number Diff line change @@ -8,5 +8,4 @@ __DIR__=$(
8
8
9
9
cd ${__DIR__}
10
10
11
- docker exec -it swoole-cli-alpine-dev sh
12
-
11
+ docker exec -it woole-cli-builder sh
Original file line number Diff line number Diff line change 1
- #
1
+ # 当环境中没有 PHP 解释器时 可以快速安装 PHP 解释器
2
2
3
- ## 当环境中没有 PHP 解释器时 可以快速安装 PHP 解释器
4
3
``` bash
5
4
6
5
# alpine
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ if [ ! -f /usr/libexec/docker/cli-plugins/docker-compose ]; then
24
24
25
25
# show more version info
26
26
# https://github.com/docker/compose/releases
27
- VERSION=" v2.29 .1"
27
+ VERSION=" v2.32 .1"
28
28
29
29
curl -fsSL " https://github.com/docker/compose/releases/download/${VERSION} /docker-compose-$( uname -s) -$( uname -m) " -o /usr/local/bin/docker-compose
30
30
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ while [ $# -gt 0 ]; do
28
28
shift $(( $# > 0 ? 1 : 0 ))
29
29
done
30
30
31
-
32
31
# https://github.com/docker/docker-install.git
33
32
# test -f get-docker.sh || curl -fsSL https://get.docker.com -o get-docker.sh
34
33
@@ -41,14 +40,15 @@ china | ustc | tuna)
41
40
;;
42
41
esac
43
42
44
-
45
43
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
49
50
fi
50
51
51
-
52
52
case " $MIRROR " in
53
53
china | ustc)
54
54
sed -i " s@https://mirrors.aliyun.com/docker-ce@https://mirrors.ustc.edu.cn/docker-ce@g" get-docker.sh
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ __PROJECT__=$(
12
12
cd ${__DIR__}
13
13
14
14
{
15
- docker stop swoole-cli-alpine-dev
16
15
docker stop swoole-cli-builder
17
16
sleep 5
18
17
} || {
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ __PROJECT__=$(
12
12
cd ${__DIR__}
13
13
14
14
{
15
- docker stop swoole-cli-alpine-dev
16
15
docker stop swoole-cli-builder
17
16
sleep 5
18
17
} || {
@@ -28,9 +27,9 @@ while [ $# -gt 0 ]; do
28
27
--mirror)
29
28
MIRROR=" $2 "
30
29
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
+ ;;
34
33
esac
35
34
;;
36
35
esac
Original file line number Diff line number Diff line change @@ -27,15 +27,14 @@ while [ $# -gt 0 ]; do
27
27
--mirror)
28
28
MIRROR=" $2 "
29
29
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
+ ;;
33
33
esac
34
34
;;
35
35
esac
36
36
shift $(( $# > 0 ? 1 : 0 ))
37
37
done
38
38
39
-
40
39
cd ${__DIR__}
41
40
docker run --rm --name swoole-cli-debian-dev -d -v ${__PROJECT__} :/work -w /work --init $IMAGE tail -f /dev/null
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /usr/ bin/env bash
2
2
< ? php
3
3
/**
4
4
* @var $this SwooleCli\P reprocessor
You can’t perform that action at this time.
0 commit comments