Unable to push docker image to Openshift Origin Docker registry

I was trying to deploy a docker image I have created via Openshift. I followed the instructions in: http://www.opensourcerers.org/importing-an-external-docker-image-into-red-hat-openshift-v3/

However, as I tried to push my docker image to the Openshift registry, it did not succeed, as shown below

  • Secure Consul with SSL does not work
  • Docker, php and python
  • install docker on network drive
  • How to set PS1 in Docker Container
  • How do you list containers in Docker.io?
  • docker vs docker-compose nginx: [emerg] host not found in upstream “httpstat.us” in /etc/nginx/nginx.conf:21
  • [root@mymachine ~]# docker push

    The push refers to a repository

    0a4a35d557a6: Preparing

    025eba1692ec: Preparing

    5332a889b228: Preparing

    e7b287e8074b: Waiting

    149636c85012: Waiting

    f96222d75c55: Waiting

    no basic auth credentials

    Following are the docker version and openshift versions:

    [root@mymachine ~]# docker –version

    Docker version 1.11.0, build 4dc5990

    [root@mymachine ~]# oc version

    oc v1.2.0

    kubernetes v1.2.0-36-g4a3f9c5

    Could someone help me out with this? Not sure what it means by “no basic auth credentials” since the openshift user and server user are root users with all privileges.

  • Can't connect to MySQL docker container launched via ansible
  • Assign one docker instance to each client
  • docker and image size limit
  • Does docker reuse images when multiple containers run on the same host?
  • Update hosts file in all containers
  • How can I connect to MongoDB on a Dokku host?
  • One Solution collect form web for “Unable to push docker image to Openshift Origin Docker registry”

    After performing oc login to authenticate on your cluster you have to go inside your default project

    $ oc project default

    Check the service ip of your registry:

    $ oc get svc
    NAME              CLUSTER-IP       EXTERNAL-IP   PORT(S)                   AGE
    docker-registry   172.30.xx.220   <none>        5000/TCP                  76d
    kubernetes       <none>        443/TCP,53/UDP,53/TCP     76d
    router            172.30.xx.xx     <none>        80/TCP,443/TCP,1936/TCP   76d

    Check your token:

    $ oc whoami -t

    Now you can authenticate on your registry:

    docker login -u test -e any@mail.com -p trSZhNVi8F_N3Pxxx 172.30.xx.220:5000
    WARNING: login credentials saved in /root/.docker/config.json
    Login Succeeded
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.