fix(ci): use host networking and custom DNS for DinD builds

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Chever John 2026-06-17 10:28:17 +08:00
parent a4914dd14c
commit 89106e95af
No known key found for this signature in database
GPG Key ID: 2894D52ED1211DF0

View File

@ -13,7 +13,8 @@ build-frontend:
stage: build
image: docker:27
services:
- docker:27-dind
- name: docker:27-dind
command: ["--dns", "10.43.0.10", "--dns", "223.5.5.5"]
retry: 2
before_script:
- until docker info >/dev/null 2>&1; do echo "Waiting for Docker daemon..."; sleep 2; done
@ -25,7 +26,7 @@ build-frontend:
else
TAG="main-${CI_COMMIT_SHORT_SHA}"
fi
- docker build -t $HARBOR_REGISTRY/$HARBOR_PROJECT/iloom-frontend:$TAG .
- docker build --network host -t $HARBOR_REGISTRY/$HARBOR_PROJECT/iloom-frontend:$TAG .
- docker push $HARBOR_REGISTRY/$HARBOR_PROJECT/iloom-frontend:$TAG
rules:
- if: $CI_COMMIT_BRANCH == "main"