CICD process, docker login to Container Registry fail.
- my .gitcicd.yaml
stages:
- build
job_build_dev:
image: docker:stable
stage: build
script:
- echo "=============== docker build image ==============="
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --build-arg configuration=development -t $CI_REGISTRY_IMAGE:dev_v0.0.1 .
- docker push $CI_REGISTRY_IMAGE:dev_v0.0.1
only:
- dev
tags:
- njdev
- output
$ echo "=============== docker build image ==============="
=============== docker build image ===============
$ docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
error during connect: Post http://docker:2375/v1.40/auth: dial tcp: lookup docker on 172.31.0.2:53: no such host
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
- The probability of occurrence is 10%.Please help gitlab bosses solve it. Thank you.