Code quality template is not working in kubernetes
Because of [ -z "$DOCKER_HOST" -a "$KUBERNETES_PORT" ]
DOCKER_HOST is not getting assigned, so build fails with:
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock
Removing KUBERNETES_PORT from the construction solves the issue.