I’ve been trying to push a docker image to the registry for a repo i have on gitlab.com via registry.gitlab.com without success. I was able to push it to docker’s repo hosting last night, https://hub.docker.com/r/amardikian/clang-3.8/, and have been using it there in the meantime.
Here is the usual attempt that occurs for the gitlab push (with some extra space between commands).
Note that I am the owner of the Unkn group on gitlab.com
home# docker login registry.gitlab.com
Username: amardikian
Password:
Email: my email :o
FATA[0014] Error response from daemon: no successful auth challenge for https://registry.gitlab.com/v2/ - errors: [token auth attempt for registry https://registry.gitlab.com/v2/: https://gitlab.com/jwt/auth?account=amardikian&service=container_registry request failed with status: 403 Forbidden]
home# docker login registry.gitlab.com
Username: amardikian
Password:
Email: my email :o
WARNING: login credentials saved in /root/.dockercfg.
Login Succeeded
home# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
amardikian/clang-3.8 latest f99ea68f7a60 42 hours ago 734.6 MB
registry.gitlab.com/unkn/example latest f99ea68f7a60 42 hours ago 734.6 MB
ubuntu 16.04 65e1e9d1a19f 3 days ago 126.4 MB
ubuntu latest 65e1e9d1a19f 3 days ago 126.4 MB
ubuntu 14.04 1be01061bd9d 3 days ago 188 MB
home# docker push registry.gitlab.com/unkn/example:latest
The push refers to a repository [registry.gitlab.com/unkn/example] (len: 1)
FATA[0011] v1 ping attempt failed with error: Get https://registry.gitlab.com/v1/_ping: dial tcp: i/o timeout. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry registry.gitlab.com` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/registry.gitlab.com/ca.crt
home# docker push registry.gitlab.com/unkn/example:latest
The push refers to a repository [registry.gitlab.com/unkn/example] (len: 1)
f99ea68f7a60: Image already exists
e17498a47939: Image already exists
7fb3fbb84707: Image already exists
4a811732cafe: Image push failed
Please login prior to push:
Username (amardikian):
WARNING: login credentials saved in /root/.dockercfg.
Login Succeeded
The push refers to a repository [registry.gitlab.com/unkn/example] (len: 1)
f99ea68f7a60: Image already exists
e17498a47939: Image already exists
7fb3fbb84707: Image already exists
4a811732cafe: Image push failed
FATA[5842] Error pushing to registry: Authentication is required.
Could anyone enlighten me on what I am doing wrong?
Side note:
I know the image is pretty big just read https://blog.replicated.com/2016/02/05/refactoring-a-dockerfile-for-image-size/ and have it reduced to 475.8 MB now.