From aa7a7e3d1cbc65245d5f1900a30567104611cf4c Mon Sep 17 00:00:00 2001 From: continuist Date: Sat, 5 Jul 2025 12:31:21 -0400 Subject: [PATCH] Give DinD some time to be ready if it's not already running --- .forgejo/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 5ee5369..881230a 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -32,8 +32,11 @@ jobs: else echo "DinD container exists but is not running, starting it..." docker start ci-dind - # Wait for DinD to be ready - timeout 60 bash -c 'until docker exec ci-dind docker version; do sleep 2; done' + + # Wait for DinD container to be fully ready + echo "Waiting for DinD container to be ready..." + timeout 30 bash -c 'until docker exec ci-dind docker version > /dev/null 2>&1; do echo "Waiting for Docker daemon inside DinD..."; sleep 5; done' + echo "DinD container is ready" fi else echo "Starting new DinD container..." @@ -47,7 +50,8 @@ jobs: # Wait for DinD to be ready echo "Waiting for DinD container to be ready..." - timeout 60 bash -c 'until docker exec ci-dind docker version; do sleep 2; done' + timeout 15 bash -c 'until docker exec ci-dind docker version > /dev/null 2>&1; do echo "Waiting for Docker daemon inside DinD..."; sleep 5; done' + echo "DinD container is ready" # Copy Harbor certificate to DinD container docker cp /etc/ssl/registry/registry.crt ci-dind:/usr/local/share/ca-certificates/