I’m having an issue with a docker build image, the intention is to use it to build docker images for use as runners, ansible etc. The issue I’m having is that even a very simple deployment fails with service unavailable.
Here is the pipeline definition
stages:
- build
docker_build:
stage: build
image: docker:latest
services:
- docker:dind
script:
- docker info
And here is the output
Running on runner-zqec-bjs-project-44882169-concurrent-0cm7qk via kube-runner-gitlab-runner-77fbc58bf9-fp2hm...
Getting source from Git repository
00:02
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/silvacloudsystems/aqua-container-build/.git/
Created fresh repository.
Checking out 3dba9ffe as detached HEAD (ref is main)...
Skipping Git submodules setup
Executing "step_script" stage of the job script
00:01
$ docker info
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.8.2)
compose: Docker Compose (Docker Inc., v2.6.0)
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: command terminated with exit code 1
I’ve tried different runners, docker-based, Kubernetes based and shared, with the same results. I’ve tried with and without the service set, with the host and port variables set and it’s the same basic issue.
Does anyone have any thoughts about what might be causing the issue or a better way to perform the same function.