docker image push does not work

  • I have created a new docker image with a

    # docker build -t my-phpapache:7.4 .

    Now, when I try to make

    # docker image push

    I'm logged in to a Docker hub in a browser. I see the errors:

    $ docker image push --all-tags
    The push refers to repository []
    f04ed43187a6: Preparing 
    0ff1b9aaef0c: Preparing 
    c18803e039cd: Preparing 
    a735fdc00d49: Preparing 
    de7c912f2726: Preparing 
    e835c99ddfc4: Waiting 
    1f55d9e78afa: Waiting 
    5aefa6797d83: Waiting 
    70af74272d2e: Waiting 
    58e3131f3b01: Waiting 
    a1bae98a9430: Waiting 
    752cff7a1101: Waiting 
    be3607e92e69: Waiting 
    2ffebc0bdeea: Waiting 
    4c94b016478b: Waiting 
    a9019c838a13: Waiting 
    015643a98838: Waiting 
    f2c64a370cec: Waiting 
    d5b8874e6c41: Waiting 
    9eb82f04c782: Waiting 
    denied: requested access to the resource is denied

  • To push, you need write access to the destination repository. With Docker Hub, those repositories must be under your userid, or in an organization where you have write access. The default path you see added,, is used by official images, which makes pulling official images easier. But since you aren't the author of docker official images, that won't work for pushing.

    That means you need to:

    docker build -t your-user/your-image:v1 .
    docker push your-user/your-image:v1

    Where your-user is the same user you used when running docker login.

Log in to reply

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2