I have question regarding CI tasks with docker containers.
Take a look a the following task. This is what I found common when building a docker image and push it to a registry.
image_build: stage: release image: name: docker:19.03.1 variables: DOCKER_TLS_CERTDIR: "/certs" services: - name: docker:19.03.1-dind # alias: docker script: - docker info ...
What i do not understand: Why use a docker image paired with a docker-in-docker service? Why not just use a docker-in-docker image?
Also, has anyone managed to get this working. For some reason I cant reach the dind socket from the docker container even though they are on the same network. The task fails with this error:
$ docker info error during connect: Get https://docker:2376/v1.39/info: dial tcp: lookup docker on 127.0.0.11:53: no such host ERROR: Job failed: exit code 1
Here is my runner config.toml
concurrent = 1 check_interval = 0 [session_server] session_timeout = 1800 [[runners]] name = "Gitlab runner for Kubernetes ops" url = "http://gitlab" token = "k9hqyTbyMgyS4wck7aqo" executor = "docker" pre_clone_script = "git config --global http.sslCAInfo /etc/ssl/certs/myCA.crt" tls-ca-file = "/etc/gitlab-runner/certs/myCA.crt" [runners.custom_build_dir] [runners.docker] tls_verify = false image = "ruby:2.6" privileged = false disable_entrypoint_overwrite = false oom_kill_disable = false disable_cache = false volumes = ["/certs/client", "/cache", "/home/yacine/Documents/kube-gitlab-cicd/ca/myCA.pem:/etc/ssl/certs/myCA.crt"] shm_size = 0 network_mode = "traefik" [runners.cache] [runners.cache.s3] [runners.cache.gcs]
Is this related to the MR 1569?