Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`docker pull` returns `denied: access forbidden` from private gitlab registry

I have a Dockerfile which is going to be implemented FROM a private registry's image. I build this file without any problem with Docker version 1.12.6, build 78d1802 and docker-compose version 1.8.0, build unknown, but in another machine which has Docker version 17.06.1-ce, build 874a737 and docker-compose version 1.16.1, build 6d1ac21, the docker-compose build returns:

FROM my.private.gitlab.registry:port/image:tag http://my.private.gitlab.registry:port/v2/docker/image/manifests/tag: denied: access forbidden 

docker pull my.private.gitlab.registry:port/image:tag returns the same.

Notice that I tried to get my.private.registry:port/image:tag and http://my.private.registry:port/v2/docker/image/manifests/tag has been catched.

like image 530
Zeinab Abbasimazar Avatar asked Sep 26 '17 05:09

Zeinab Abbasimazar


1 Answers

If this is an authenticated registry, then you need to run docker login <registryurl> on the machine where you are building this.

This only needs to be done once per host. The command then caches the auth in a file

$ cat ~/.docker/config.json {     "auths": {         "https://index.docker.io/v1/": {             "auth": "......="         }     } } 
like image 190
Tarun Lalwani Avatar answered Sep 19 '22 09:09

Tarun Lalwani