DEV Community

Discussion on: How to make friends with Golang, Docker and GitLab CI

Collapse
 
hypnoglow profile image
Igor Zibarev

Hi Vishnu,

When building Docker images, we need both Docker client and Docker daemon. That's why we:

  • use docker:17 as a base image for the job to call Docker client;
  • add docker:dind to the job as a service for the daemon.

There is a simple example of this interaction on Docker hub hub.docker.com/_/docker without involving GitLab CI.

p.s. FYI there are alternative solutions that allow building docker images without docker client, but these are out of scope and require more effort.