ci: buildah 嵌套容器适配——BUILDAH_ISOLATION=chroot 钉死隔离(runc/crun 过不了嵌套 cgroup);apk 补 netavark(容器网络助手,不随 buildah 自动装)
Build Tutorial / Build @stack/tutorial (buildah) (pull_request) Successful in 1m44s
Build Tutorial / Build @stack/tutorial (buildah) (pull_request) Successful in 1m44s
This commit is contained in:
1 parent
3a41a4ab1a
commit
1b89e2a8f0
1 file changed
+4
-1
@@ -13,6 +13,8 @@ on:
|
|||||||
env:
|
env:
|
||||||
YARN_NPM_REGISTRY_SERVER: https://registry.npmmirror.com
|
YARN_NPM_REGISTRY_SERVER: https://registry.npmmirror.com
|
||||||
API: https://gitea.idealjs.com/api/v1/repos/idealjs/stack
|
API: https://gitea.idealjs.com/api/v1/repos/idealjs/stack
|
||||||
|
# runner 是套娃容器——buildah 的 OCI runtime(runc/crun)在内部过不了 cgroup 关,钉死 chroot 隔离
|
||||||
|
BUILDAH_ISOLATION: chroot
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -30,7 +32,8 @@ jobs:
|
|||||||
command -v buildah >/dev/null && exit 0
|
command -v buildah >/dev/null && exit 0
|
||||||
# 服务器在阿里云——apk 走阿里镜像源(dl-cdn 直连极慢)
|
# 服务器在阿里云——apk 走阿里镜像源(dl-cdn 直连极慢)
|
||||||
sed -i 's#https://dl-cdn.alpinelinux.org#https://mirrors.aliyun.com#g' /etc/apk/repositories
|
sed -i 's#https://dl-cdn.alpinelinux.org#https://mirrors.aliyun.com#g' /etc/apk/repositories
|
||||||
apk add --no-cache buildah
|
# netavark: buildah 配容器网络的助手,alpine 不会随 buildah 自动装
|
||||||
|
apk add --no-cache buildah netavark
|
||||||
|
|
||||||
- name: buildah 登录阿里云镜像仓(基座为私有 idealjs/node)
|
- name: buildah 登录阿里云镜像仓(基座为私有 idealjs/node)
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in new issue
Block a user