I am using GitLab with a runner on kubernetes.
I have a pipeline that needs my docker image from a insecure registry. So the first line of my .gitlab-ci.yml is:
image: "nexus:8082/myimage:1.0"
When I run the pipeline I receive the following error:
Error response from daemon: Get “https://nexus:8082/v2/”
As you see it’s trying to connect on https, while my docker registry is insecure.
I tried to follow instruction I read at
I created a daemon.json file with this content:
{
"insecure-registries" : ["nexus:8082"]
}
And then I create a configmap like this:
kubectl create configmap docker-daemon --namespace cicd --from-file /tmp/daemon.json
I have edited my config.toml to be this:
concurrent = 4
[[runners]]
name = "gitlab-runner"
url = "http://gitlab"
token = "Vs785eyg2JZ3-V5yGsBQ"
executor = "kubernetes"
[runners.kubernetes]
tls_verify = false
privileged = true
namespace = "cicd"
pull_policy = "always"
poll_timeout = 600
cpu_request = "1"
service_cpu_request = "200m"
[[runners.kubernetes.volumes.config_map]]
name = "docker-daemon"
mount_path = "/etc/docker/daemon.json"
sub_path = "daemon.json"
I also have a DOCKER_AUTH_CONFIG CI/CD variable with value:
{
"auths": {
"nexus:8082": {
"auth": "YWRtaW46YWRtaW4="
}
}
}
So far these settings have no effect on letting GitLab get the image from an insecure registry using http instead of https. Any help is much appreciated.