+17 votes
2 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

+20 votes
by (10.6k 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

+11 votes
by (92.8k 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.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...