Environment Setup1 min read
docker denied/requested access to the resource is denied
When pushing a Docker image I created to Docker Hub, I encountered the “denied: requested access to the resource is denied” error. The cause was that when tagging the image during the build process, the tag needed to begin with my Docker Hub username.
Read in Chinese→When I pushed a Docker image I created to Docker Hub, I encountered the error above.
docker denied/ requested access to the resource is denied.md
Cause Analysis:
When adding a tag while building your own image, you must prefix it with your Docker Hub username.
For example, to push a local image to my account, use the following command.
Step 1: Package the container as an image
docker commit -a="test" -m="test" 58b8cae10a89 test/zyimage:0.0.1
- test/zyimage:0.0.1
testis your account name on Docker Hub.zyimageis the image name.0.0.1is the image tag.
Step 2: Upload the image, then pull the corresponding image
docker push test/zyimage:0.0.1
After this is complete, you can see the image you just pushed under Repositories in My Profile on Docker Hub.