I am using .gitlab-ci.yml file as below. I want to perform docker pull & push to google container registry
image:
name: google/cloud-sdk:latest
entrypoint: [ "" ]
variables:
UNLEASH_IMAGE_NAME: "unleash"
stages:
- print
print:
stage: print
script:
- gcloud config set auth/impersonate_service_account $GCP_BUILD_SA
- gcloud config set project $GCP_PROJECT_BUILD_ID
- gcloud auth configure-docker
- docker pull unleashorg/unleash-proxy:latest
- docker tag unleashorg/unleash-proxy:latest gcr.io/$GCP_PROJECT_BUILD_ID/UNLEASH_IMAGE_NAME:$CI_COMMIT_SHORT_SHA
- docker images
I am getting below error in my pipeline when I run docker images just to test whether its working: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
- I have tried entering the container & running the docker images command but same error.
- I tried command service docker start & systemctl but these tools/commands are not there in container.
How do I resolve this issue. I just want to docker pull & push in this image.