I am noticing the issue when I ran the code quality CI job - Cannot connect to the Docker daemon at tcp://localhost:2375

I am noticing the below issue when I ran the code quality CI job, any suggestions on fixing it, please?

Error details:

$ docker pull --quiet “$CODE_QUALITY_IMAGE”
Cannot connect to the Docker daemon at tcp://localhost:2375. Is the docker daemon running?

CI job - details:

include:
- template: Jobs/Code-Quality.gitlab-ci.yml

code_quality:
stage: test
image: docker:20-dind
cache:
key: ${CI_PIPELINE_ID}
paths:
- $CI_PROJECT_DIR/
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: “”
services:
- docker:20-dind
alias: docker
command: [“–tls=false”]
artifacts:
reports:
codequality: [gl-code-quality-report.json]
interruptible: true
needs:
- sea-maven-build-maven-build
dependencies:
- sea-maven-build

code_quality_html:
stage: test
image: docker:20.10.16-dind
extends: code_quality
cache:
key: ${CI_PIPELINE_ID}
paths:
- $CI_PROJECT_DIR/
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: “”
REPORT_FORMAT: html
services:
- docker:20.10.16-dind
alias: docker
command: [“–tls=false”]
artifacts:
paths: [gl-code-quality-report.html]
interruptible: true
needs:
- sea-maven-build
dependencies:
- sea-maven-build

I don’t know what you are trying to achieve by importing the template Jobs/Code-Quality.gitlab-ci.yml which already defines a job called code_quality and then overriding the job by defining it again in your .gitlab-ci.yml?

You probably don’t need the code_quality job in your file at all.