Skip to content

Commit b2efdf1

Browse files
committed
fix: use correct CA path for Alpine-based BuildKit container
1 parent adceb5e commit b2efdf1

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/docker-build.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,16 @@ jobs:
146146
147147
echo "Found BuildKit container: ${BUILDKIT_CONTAINER}"
148148
149-
# Copy the CA certificate into the BuildKit container
150-
docker cp /tmp/registry-ca.crt "${BUILDKIT_CONTAINER}:/usr/local/share/ca-certificates/registry-ca.crt"
151-
152-
# Update CA certificates inside the BuildKit container
153-
docker exec "$BUILDKIT_CONTAINER" update-ca-certificates 2>/dev/null || \
154-
docker exec "$BUILDKIT_CONTAINER" cat /usr/local/share/ca-certificates/registry-ca.crt >> /etc/ssl/certs/ca-certificates.crt
149+
# Append the CA certificate directly to the CA bundle inside the container
150+
# BuildKit uses Alpine which has certs at /etc/ssl/certs/ca-certificates.crt
151+
docker cp /tmp/registry-ca.crt "${BUILDKIT_CONTAINER}:/tmp/registry-ca.crt"
152+
docker exec "$BUILDKIT_CONTAINER" sh -c 'cat /tmp/registry-ca.crt >> /etc/ssl/certs/ca-certificates.crt'
155153
156154
# Restart buildkitd to pick up the new CA bundle
157155
docker restart "$BUILDKIT_CONTAINER"
158156
159157
# Wait for buildkitd to be ready
160-
sleep 3
158+
sleep 5
161159
162160
echo "✓ CA certificate configured in BuildKit container"
163161

0 commit comments

Comments
 (0)