fix(ci): use host networking and custom DNS for DinD builds
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
7a8df1f0d4
commit
ec8ae6a73b
@ -13,7 +13,8 @@ variables:
|
|||||||
.build-template: &build-template
|
.build-template: &build-template
|
||||||
image: docker:27
|
image: docker:27
|
||||||
services:
|
services:
|
||||||
- docker:27-dind
|
- name: docker:27-dind
|
||||||
|
command: ["--dns", "10.43.0.10", "--dns", "223.5.5.5"]
|
||||||
retry: 2
|
retry: 2
|
||||||
before_script:
|
before_script:
|
||||||
- until docker info >/dev/null 2>&1; do echo "Waiting for Docker daemon..."; sleep 2; done
|
- until docker info >/dev/null 2>&1; do echo "Waiting for Docker daemon..."; sleep 2; done
|
||||||
@ -25,7 +26,7 @@ variables:
|
|||||||
else
|
else
|
||||||
TAG="main-${CI_COMMIT_SHORT_SHA}"
|
TAG="main-${CI_COMMIT_SHORT_SHA}"
|
||||||
fi
|
fi
|
||||||
- docker build -t $HARBOR_REGISTRY/$HARBOR_PROJECT/$IMAGE_NAME:$TAG -f $DOCKERFILE_PATH .
|
- docker build --network host -t $HARBOR_REGISTRY/$HARBOR_PROJECT/$IMAGE_NAME:$TAG -f $DOCKERFILE_PATH .
|
||||||
- docker push $HARBOR_REGISTRY/$HARBOR_PROJECT/$IMAGE_NAME:$TAG
|
- docker push $HARBOR_REGISTRY/$HARBOR_PROJECT/$IMAGE_NAME:$TAG
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == "main"
|
- if: $CI_COMMIT_BRANCH == "main"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user