Reputation: 11975
I am new to Docker
and trying to push the Docker
image to the hub..giving me the below error.
docker container run hellowold
This is v2
docker image tag hellowold:2 prateekaxyz/hellowold:latest
docker login http://hub.docker.com --username=prateek512
Password:
Login Succeeded
docker push prateekaxyz/hellowold:latest
The push refers to a repository [docker.io/prateekaxyz/hellowold]
93351e248e6e: Preparing
298c3bb2664f: Preparing
73046094a9b8: Preparing
denied: requested access to the resource is denied
Upvotes: 7
Views: 25384
Reputation: 1
I have the right answer, the tag name is the key point!!!
if your docker hub username is: "liushi2n", then your image should be named like this:
liushi2n/centos79py310 1.0 d22a5f384b99 53 minutes ago 1.57GB
Upvotes: 0
Reputation: 479
This helped me:
docker build -t [docker-id]/reponame .
which will by default be given "latest" as tag and then run:
docker push [docker-id]/reponame:latest
Upvotes: 3
Reputation: 39
You need to first tag your image before pushing
docker tag firstimage YOUR_DOCKERHUB_NAME/firstimage And then you can push it.
docker push YOUR_DOCKERHUB_NAME/firstimage
reference: https://intellipaat.com/community/207/denied-requested-access-to-the-resource-is-denied-docker
Upvotes: 3
Reputation: 1353
you should login first. suppose you have an account in https://hub.docker.com/ as name/password= prateekaxyz/bar.
before push, you should
docker login -u prateekaxyz -p bar
after login success, you can push image to docker hub under your namespace
note that your image should begin with your name, eg prateekaxyz/aa:version
Upvotes: 3