Fixing “requested access to the resource is denied” in Docker

shape
shape
shape
shape
shape
shape
shape
shape

When trying to do a Docker Push from your image to Docker Hub, if the Build has not been done with the correct “tag” name, it is common for the error “denied: requested access to the resource is denied” to be displayed. Fixing this error is simple and I’ll show you how.

How to fix “requested access to the resource is denied”

Step 1: Re-login to Docker Hub

Let’s make sure we’re logged into the correct Docker Hub account. To do this, log out and log in to your Docker Hub account:

docker logout 

Then log in again (you will be prompted for your username and password after executing the command below from your Docker Hub:

docker login 

Step 2: Build the image and name it Tag

Build the image (in our example below the name of our tag will be mw-cloud):

docker build -t mw-cloud .

Assign your Docker Hub repository to the image you built in the step above (in the example below, the name of our repository is “masterdaweb”):

docker tag mw-cloud masterdaweb/mw-cloud:mw-cloud

Step 3: Docker Push your image

Now let’s push our image to Docker Hub:

 docker push  masterdaweb/mw-cloud:mw-cloud

That’s it! Image successfully uploaded to Docker Hub:

Need a Docker server?

Master da Web has the solution you need to run your Docker server, whether on a virtualized machine or a Dedicated server. Find out more about our server plans.

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest news

Latest news directly from our blog.