Docker Community Forums

Share and learn in the Docker community.

Can't push to my private docker registry

docker

(Lorenzvth7) #1

I have installed and configured a master-node environment with Docker, Kubernetes, OpenShift.
I have one master and 2 nodes. I’ve created a docker registry on my master:

> oadm registry --config=admin.kubeconfig \    --credentials=openshift-registry.kubeconfig \
> --selector='region=infra'

Log in into remote registry

Now I'm trying to access to this repo from my nodes. I can login in them but not push.
[root@ip-10-0-0-x ~]# docker login -u test-admin -e lorenz.vanthillo@evolane.be \
> -p KdU8Za8SMhXhsGPg5x3oH5bw9YzdbVBrDEib9mbC9Ss 172.30.153.158:5000
WARNING: login credentials saved in /root/.docker/config.json
Login Succeeded

Try to push to the remote registry:

[root@ip-10-0-0-x ~]# docker push 172.30.153.158:5000/openshift/busybox
The push refers to a repository [172.30.153.158:5000/openshift/busybox] (len: 1)
d7057cb02084: Image push failed 

Please login prior to push:
Username (test-admin): 
WARNING: login credentials saved in /root/.docker/config.json
Login Succeeded
The push refers to a repository [172.30.153.158:5000/openshift/busybox] (len: 1)
d7057cb02084: Image push failed 
Error pushing to registry: Authentication is required.

I’ve created my docker registry in the default project of openshift. Is this an issue because normally test-admin (my user) can’t access the default project of openshift