Reputation: 6242
I setup a docker registry (ECR) on AWS. From my gitlab repository I'd like to setup a CI to automatically create images and push them to the repository. I was following the following tutorial to setup everything, but when running the example, I receive the error
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
My yml file looks like this
image: docker:latest
variables:
REPOSITORY_URL: <aws-url>/<registry>/outsite-slackbot
services:
- docker:dind
before_script:
- apk add --no-cache curl jq python py-pip
- pip install awscli
stages:
- build
build:
stage: build
script:
- $(aws ecr get-login --no-include-email --region eu-west-1)
Upvotes: 0
Views: 1154
Reputation: 2147
There is no problem with the Dockerfile, you can't be connected to docker daemon by the way. So check these steps:
sudo su
or sudo -i
)service docker start
)Then follow the tutorial :)
Upvotes: 2