I have configured a self-hosted GitLab with runners and enables the docker registry.
When I try to login from a machine in the same network, all seems to work fine:
sudo docker login -u xxxx -p xxxx my.domain:4567 WARNING! Using --password via the CLI is insecure. Use --password-stdin. WARNING! Your password will be stored unencrypted in /root/.docker/config.json. Configure a credential helper to remove this warning. See https://docs.docker.com/engine/reference/commandline/login/#credentials-store
When I try to run it from within a CI runner (also in the same network), there seems to be an issue with the certificates:
$ docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY WARNING! Using --password via the CLI is insecure. Use --password-stdin. Error response from daemon: Get https://xxxx/v2/: x509: certificate signed by unknown authority ERROR: Job failed: exit code 1
Any idea what I am missing?
image: docker:latest services: - docker:dind stages: - build - test - release variables: TEST_IMAGE: xxxx:$CI_COMMIT_REF_NAME RELEASE_IMAGE: xxxx:latest before_script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY ...