Compare commits

..
Author SHA1 Message Date
panxiao81 38946e8def 使用 vfs 构建嵌套容器镜像
test / shell (pull_request) Successful in 20s
test / python (pull_request) Successful in 9s
2026-09-16 18:16:41 +00:00
panxiao81 893323a89b Merge pull request '添加 Zot 镜像构建发布流水线' (#14) from feat/image-publish-pipeline into main
test / python (push) Successful in 9s
test / shell (push) Successful in 16s
publish images / publish-images (push) Failing after 57s
Reviewed-on: #14
2026-09-16 18:12:25 +00:00
+7 -5
View File
@@ -45,7 +45,12 @@ jobs:
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
dockerd >/tmp/dockerd.log 2>&1 & # The runner Pod itself uses an overlay filesystem. A nested overlay
# snapshotter cannot mount there, so use the copy-based vfs driver.
dockerd \
--storage-driver=vfs \
--feature containerd-snapshotter=false \
>/tmp/dockerd.log 2>&1 &
for _ in $(seq 1 60); do for _ in $(seq 1 60); do
if docker info >/dev/null 2>&1; then if docker info >/dev/null 2>&1; then
exit 0 exit 0
@@ -71,7 +76,6 @@ jobs:
jwt_file=$(mktemp) jwt_file=$(mktemp)
cleanup() { cleanup() {
rm -rf -- "$docker_config" "$jwt_file" rm -rf -- "$docker_config" "$jwt_file"
docker buildx rm ci-builder >/dev/null 2>&1 || true
} }
trap cleanup EXIT trap cleanup EXIT
export DOCKER_CONFIG="$docker_config" export DOCKER_CONFIG="$docker_config"
@@ -84,14 +88,12 @@ jobs:
jq -er '.[0].svids[0].svid' "$jwt_file" | \ jq -er '.[0].svids[0].svid' "$jwt_file" | \
docker login "$PUSH_REGISTRY" --username zot --password-stdin docker login "$PUSH_REGISTRY" --username zot --password-stdin
docker buildx create --name ci-builder --driver docker-container --use
publish() { publish() {
local repository=$1 local repository=$1
local dockerfile=$2 local dockerfile=$2
local metadata=$3 local metadata=$3
docker buildx build \ docker buildx build \
--builder ci-builder \ --builder default \
--platform linux/amd64 \ --platform linux/amd64 \
--file "$dockerfile" \ --file "$dockerfile" \
--tag "${PUSH_REGISTRY}/${repository}:${image_tag}" \ --tag "${PUSH_REGISTRY}/${repository}:${image_tag}" \