Docker Registry login and docker CI template
Description
I cannot login to docker registry using docker:dind
service.
Using docker image sha256:d4510f536c606f1e244a0fe35ce61f7aa27e498aebf1f264badb8e1dabca4328 for predefined container...
Pulling docker image docker:latest ...
Using docker image docker:latest ID=sha256:9772d69d94502133bf364fc2311ee01ad59b2df2120b002f710238ba78599c10 for build container...
Running on runner-f1ed9e1c-project-233-concurrent-0 via cloud-runner...
Fetching changes...
HEAD is now at 0db98ce Update .gitlab-ci.yml
From https://c******b.sk/cakeci/hugo
0db98ce..21c6871 master -> origin/master
Checking out 21c6871f as master...
Skipping Git submodules setup
$ docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?). Using system default: https://index.docker.io/v1/
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
ERROR: Job failed: exit code 1
Proposal
Update gitlab-ti template for docker and use
echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
Edited by May