I am using a java:8 image to build a gradle project in gitlab.com. I want to install docker in the runner also to build a docker image out of the gradle built artifacts. The command I am using in .gitlab-ci.yml is as follows
- curl -sSL https://get.docker.com/ | sh
- newgrp docker
- docker info
Now at "docker info" the build is failing with the below error
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
So how do I install docker in a java:8 image? Or is there any gitlab ci image with java8 and docker built-in?