Here is mentioned how to solve the Docker error denied: requested access to the resource is denied: docker
. After following some simple steps you will be able to solve this problem.
I encountered the same issue, and the accepted answer provided here did not resolve it for me. After experimenting with a few steps, I managed to successfully push the image. Here’s the process that worked for me:
Log in to Docker:
docker login -u darlin
Tag your built image. In my case, the image name is “mylocalimage,” it has the default tag “latest,” and my Docker Cloud username is “darlin.” I’ve created a public repository named “dockerhub,” so my personal repository becomes “darlin/dockerhub.” I want to push the image with the tag “myfirstimagepush.” Tag it as follows:
docker tag mylocalimage:latest darlin/dockerhub:myfirstimagepush
Push the image to my personal Docker repository:
docker push darlin/dockerhub:myfirstimagepush
This successfully pushed the image to my personal Docker repository.