unable to push image in docker - docker

I have made an image using the command docker build -t my-app-1.0-snapshot .. When I try to push it to Docker Hub from windows cmd, I get error
docker push manuchadha25/my-app-1.0-snapshot
The push refers to repository [docker.io/manuchadha25/codingjediweb-1.0-snapshot]
An image does not exist locally with the tag: manuchadha25/my-app-1.0-snapshot
When I tried just using the name of the image without my username, I get access denied error
The push refers to repository [docker.io/library/codingjediweb-1.0-snapshot]
5bd738db4dd5: Preparing a57994b863ef: Preparing 85802b819ba0: Preparing 3cb3e7a9fe58: Preparing 04dc636f40fe: Preparing 691339400516: Waiting 2ee490fbc316: Waiting b18043518924: Waiting 9a11244a7e74: Waiting 5f3a5adb8e97: Waiting 73bfa217d66f: Waiting 91ecdd7165d3: Waiting e4b20fcc48f4: Waiting denied: requested access to the resource is denied
Then I tried to tag the image using docker tag my-app-1.0-snapshot:latest coding_jedi_first_deployment:1.00 and then I tried to push it but again got access denied error. I have logged using docker login already.
The push refers to repository [docker.io/library/my_app_first_deployment]
5bd738db4dd5: Preparing a57994b863ef: Preparing 85802b819ba0: Preparing 3cb3e7a9fe58: Preparing 04dc636f40fe: Preparing 691339400516: Waiting 2ee490fbc316: Waiting b18043518924: Waiting 9a11244a7e74: Waiting 5f3a5adb8e97: Waiting 73bfa217d66f: Waiting 91ecdd7165d3: Waiting e4b20fcc48f4: Waiting denied: requested access to the resource is denied
What am I doing wrong>

The image needs to be tagged manuchadha25/my-app-1.0-snapshot
Then you can push it with
docker push manuchadha25/my-app-1.0-snapshot

Related

Unable to Docker Push to docker private repo

docker push appdevin/test-repo:latest ─╯
The push refers to repository [docker.io/appdevin/test-repo]
2e1a538f9cb1: Preparing
bc59f9385408: Preparing
3fe55a1edd4f: Preparing
869bab83a5e4: Preparing
0ebf7bffb194: Preparing
b44ed2d6f3dc: Waiting
cdfa71b4f99b: Waiting
46c1f80f75fa: Waiting
b541d28bf3b4: Waiting
denied: requested access to the resource is denied
I have tried to logout from the terminal and re login with password and auth token it does not seem to work
docker login -u appdevin -p {auth token} docker.io
I have tried to specify the server that I am logging into and still was unable to push
docker push appdevin/testbuild:tagname ─╯
The push refers to repository [docker.io/appdevin/testbuild]
3e7ca392ee8e: Pushed
13df63955a40: Pushed
fe890d7835f6: Pushed
0a2c8d373234: Pushed
2210c4c3e24b: Pushed
5e7457745a23: Pushed
e0ad395f1824: Pushed
b541d28bf3b4: Pushed
tagname: digest: sha256:5875656d15eac7665c195067c99cd35a7a5c795470586ad68106e24d625935ea size: 1996
I created a new private repo and tried to push the image and it seems to work.
Anyone have an idea on what the issue?

Error happened while using Jenkins to push docker image

I'd like to push the image image/name to the docker repository image/name through Jenkins. I have logged in my docker account on my local machine. But it returned with the error:
com.github.dockerjava.api.exception.DockerClientException: Could not push image: errors:
denied: requested access to the resource is denied
unauthorized: authentication required
why?
Maybe use the library you are building with to pass credentials
From the doc:
.withRegistryUsername(registryUser)
.withRegistryPassword(registryPass)
Reference: https://github.com/docker-java/docker-java/blob/master/docs/getting_started.md
I'm assuming this is the library you use by the error message you posted.

401 error when using docker push to private registry (Heroku Registry)

While following Heroku's docs for how to push a docker image to their registry, I keep running into this error:
> docker push registry.heroku.com/<MY-APP>/web cd
Using default tag: latest
The push refers to repository [registry.heroku.com/<MY-APP>/web]
e0d052f1dc62: Preparing
41ec0e96eb83: Preparing
d081ada49467: Waiting
73c3e7ef7bc6: Waiting
unauthorized: authentication required
I continue to get a Login Succeeded whenever I try to use docker login, so I'm not sure what the issue is.
I tried to debug using the Docker Daemon logs but those weren't helpful.
Turns out I was bitten by what I'd consider to be a bug with the Heroku registry that stems from a debate about how to deny the user properly when they're logged in but try to access a resource that either doesn't exist or isn't theirs so that sensitive info, like the existence of a resource, isn't exposed (check this summary if you're interested).
TL;DR - Heroku shuold be sending a 404 but send a 401 instead - Go make the app via the UI and then try again.

Error while pushing image to docker. Requested access to the resource is denied

I am trying to push an image of my application to dockerhub but i keep getting this error:
requested access to the resource is denied.
I am already logged in with my credentials using docker login. My repository is public. I have tried everything it keeps giving me this error.
docker login
docker tag springmysqldockerswagger:latest vai/spring:myfirstimagepush
docker push vai/spring:myfirstimagepush
Any help would be appreciated.

Docker issue "requested access to the resource is denied"

PS C:\Users\user\Desktop> docker login
Authenticating with existing credentials...
Login Succeeded
PS C:\Users\user\Desktop> docker push tree
The push refers to repository [docker.io/library/tree]
701ae319ce59: Preparing
1445d87cb5ce: Preparing
a9e822192dd4: Preparing
91ad130083b0: Preparing
096da3f810e4: Preparing
508c3f3b7a64: Waiting
7e453511681f: Waiting
b544d7bb9107: Waiting
baf481fca4b7: Waiting
3d3e92e98337: Waiting
8967306e673e: Waiting
9794a3b3ed45: Waiting
5f77a51ade6a: Waiting
e40d297cf5f8: Waiting
denied: requested access to the resource is denied
That is because you don't have push access to the docker.io/library/tree repository. If you want to push an imge you created, to docker, you have to do it in your account, i.e. the push will be like
docker push <your-username>/tree

Resources