Docker Registry Login Host Not Found
Hi I'm trying to integrate docker builds into the CI but the runner is unable to find the registry host.
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD registry.0xacab.org
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 85.214.20.141:53: no such host
This job fails: https://0xacab.org/jvoisin/mat2-web/-/jobs/104452
and I'm using the following gitlab-ci.yml
image: debian:testing
stages:
- build
- linting
- test
- release
variables:
CONTAINER_TEST_IMAGE: registry.0xacab.org/jvoisin/mat2-web:$CI_BUILD_REF_NAME
CONTAINER_RELEASE_IMAGE: registry.0xacab.org/jvoisin/mat2-webt:latest
pyflakes:
stage: linting
script:
- apt-get -qqy update
- apt-get -qqy install --no-install-recommends pyflakes3
- pyflakes3 ./main.py
mypy:
stage: linting
script:
- apt-get -qqy update
- apt-get -qqy install --no-install-recommends python3-pip
- pip3 install mypy
- mypy --ignore-missing-imports main.py
tests:debian:
stage: test
script:
- apt-get -qqy update
- apt-get -qqy install --no-install-recommends mat2 python3-flask python3-coverage python3-pip python3-setuptools
- pip3 install wheel
- pip3 install -r requirements.txt
- python3-coverage run --branch --include main.py -m unittest discover -s test
- python3-coverage report -m
build-docker:
image: docker:git
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD registry.0xacab.org
- docker build -t $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_TEST_IMAGE
# only:
# - master
release-image:
image: docker:git
stage: release
script:
- docker pull $CONTAINER_TEST_IMAGE
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
- docker push $CONTAINER_RELEASE_IMAGE
# only:
# - master
Is it on purpose that the runner cannot connect to the registry?
Thx for your help ;)