Manual docker image publishing fails
Summary
When publishing a docker image from a branch manually it will fail during the job-
Error message
Running with gitlab-runner 11.8.0 (4745a6f3)
on docker-auto-scale ed2dce3a
Using Docker executor with image registry.gitlab.com/openstapps/projectmanagement/builder ...
Pulling docker image registry.gitlab.com/openstapps/projectmanagement/builder ...
Using docker image sha256:0b082c4e29fce2d59e6153fba940d15dfbc54089d7115feac2985c7e38b742e8 for registry.gitlab.com/openstapps/projectmanagement/builder ...
Running on runner-ed2dce3a-project-10261406-concurrent-0 via runner-ed2dce3a-srm-1552314717-5228d64b...
Cloning repository...
Cloning into '/builds/openstapps/backend'...
Checking out fa26b9f9 as 27-backend-fails-while-reading-config...
Skipping Git submodules setup
Downloading artifacts for build (175327913)...
Downloading artifacts from coordinator... ok id=175327913 responseStatus=200 OK token=JyVGhian
$ export REGISTRY_BRANCH=$(.gitlab/ci/getRegistryBranch.sh "$CI_JOB_NAME")
$ docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
$ docker build -t $CI_REGISTRY_IMAGE/$REGISTRY_BRANCH/$CI_COMMIT_REF_NAME:latest .
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
ERROR: Job failed: exit code 1
Possible fix
Adjust manual CI stage to utilize service docker:dind like the job definition for master branch does.