fix: 为 Pod Docker 数据配置独立卷
test / shell (pull_request) Successful in 28s
test / python (pull_request) Successful in 1m6s
test / go (pull_request) Successful in 3m8s

This commit is contained in:
2026-09-21 15:34:54 +00:00
parent 7d90f28b73
commit cc94438bad
3 changed files with 70 additions and 9 deletions
+40
View File
@@ -1,5 +1,7 @@
---
name: dynamic Pod smoke test
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
@@ -17,3 +19,41 @@ jobs:
-socketPath /run/spire/agent-sockets/spire-agent.sock \
>/dev/null
test "$(id -u)" = 2000
- name: Start job-local Docker
shell: bash
run: |
set -euo pipefail
findmnt /var/lib/docker
sudo nohup dockerd \
--host=unix:///var/run/docker.sock \
--storage-driver=overlay2 \
>/tmp/dockerd.log 2>&1 &
for _ in {1..60}; do
if docker info >/dev/null 2>&1; then
exit 0
fi
sleep 1
done
cat /tmp/dockerd.log
exit 1
- name: Build and run image
shell: bash
run: |
set -euo pipefail
context=$(mktemp -d)
cleanup() {
docker image rm --force pod-docker-smoke:test \
>/dev/null 2>&1 || true
rm -rf -- "$context"
}
trap cleanup EXIT
printf '%s\n' \
'FROM alpine:3.22' \
'RUN printf pod-docker-ok >/result' \
>"$context/Dockerfile"
docker build --tag pod-docker-smoke:test "$context"
output=$(docker run --rm pod-docker-smoke:test cat /result)
test "$output" = pod-docker-ok
test "$(docker info --format '{{.Driver}}')" = overlay2