fix: also inject internal CA into BuildKit system CA store
Some checks failed
Build and push telegraf-snmp image / build-and-push-image (push) Failing after 2m36s
Build and push rsyncd image / build-and-push-image (push) Failing after 4m15s

This commit is contained in:
dresi 2026-06-10 15:37:07 +02:00
parent 4c2ef22a9b
commit 17165069c2
2 changed files with 34 additions and 0 deletions

View File

@ -38,6 +38,23 @@ jobs:
[registry."harbor.lan"] [registry."harbor.lan"]
ca=["/tmp/buildkit-certs/harbor-ca.pem"] ca=["/tmp/buildkit-certs/harbor-ca.pem"]
- name: Trust internal CA in BuildKit system store
run: |
BUILDER=$(docker ps --filter "name=buildx_buildkit" --format "{{.Names}}" | head -1)
echo "Builder: $BUILDER"
docker exec "$BUILDER" sh -c '
echo "--- cert landscape ---"
ls -la /etc/ssl/ /etc/ssl/certs/ 2>/dev/null | head -15
for f in /etc/ssl/certs/ca-certificates.crt /etc/ssl/cert.pem; do
[ -e "$f" ] || continue
cat /etc/buildkit/certs/harbor.lan/harbor-ca.pem >> "$f"
echo "Appended CA to $f"
break
done
'
docker restart "$BUILDER"
sleep 5
- name: Build and push image - name: Build and push image
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:

View File

@ -38,6 +38,23 @@ jobs:
[registry."harbor.lan"] [registry."harbor.lan"]
ca=["/tmp/buildkit-certs/harbor-ca.pem"] ca=["/tmp/buildkit-certs/harbor-ca.pem"]
- name: Trust internal CA in BuildKit system store
run: |
BUILDER=$(docker ps --filter "name=buildx_buildkit" --format "{{.Names}}" | head -1)
echo "Builder: $BUILDER"
docker exec "$BUILDER" sh -c '
echo "--- cert landscape ---"
ls -la /etc/ssl/ /etc/ssl/certs/ 2>/dev/null | head -15
for f in /etc/ssl/certs/ca-certificates.crt /etc/ssl/cert.pem; do
[ -e "$f" ] || continue
cat /etc/buildkit/certs/harbor.lan/harbor-ca.pem >> "$f"
echo "Appended CA to $f"
break
done
'
docker restart "$BUILDER"
sleep 5
- name: Build and push image - name: Build and push image
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with: