Back

Explore Courses Blog Tutorials Interview Questions
+15 votes
3 views
in DevOps and Agile by (1.5k points)

I have created a docker image. I want to push it into my docker repo but I am facing this error:

denied: requested access to the resource is denied

2 Answers

+18 votes
by (10.5k points)
  • Follow the process stated below:

  1. Firstly, tag the image before pushing:                                                                 docker tag first image YOUR_DOCKERHUB_NAME/first image

  2. Push the image after tagging:
    docker push YOUR_DOCKERHUB_NAMEfirst image

  3. Now, login from the command line into your Docker hub account
    docker push YOUR_DOCKERHUB_NAME/first image

  • Else follow the given steps to produce the access:

  1. git clone https://github.com/docker-teamcenter/tc-common/blob/master/Dockerfile

  2. docker build -t tc-common .

  3. docker tag <container-id> drewmullen/tc-common

  4. docker login (successful)

  5. docker push drewmullen/tc-common

+10 votes
by (108k points)
edited by

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

also, do log in from the command line to your docker hub account

docker login

Here go through the following link there is a video that helps you to understand better.

Browse Categories

...