I have downloaded an image and modified it for my own front-end build requirements. Now I’d like to push it to the hub.
I have tried to run:
docker login
docker push marknorgate/apptitude-front-end-build
But this produces the following:
The push refers to a repository [docker.io/marknorgate/apptitude-front-end-build]
An image does not exist locally with the tag: marknorgate/apptitude-front-end-build
What am I doing wrong? I am using Docker v.1.12.1,
Sorted! Found a post - which I’m afraid I’ve lost - that fixed this.
For the sake of anyone reading later - was it that you needed to tag it before pushing? (Or can you share what you did?)
To be honest, I have just realised I totally misunderstood Docker. I’m just wading my way through the docs, so when I become more knowledgeable I shall come back and explain where I went wrong! That’s the best I can offer at the moment I"m afraid.
jmmann
(Jmmann)
June 13, 2017, 3:56pm
5
If anyone else gets here:
Be sure to build your code first with your username/repo before trying to push it.
Example:
docker build -t <username>/<repo>:<tag> .
Then you can push
docker push <username>/<repo>:<tag>
Hope this helps.
tworogue
(Tworogue)
June 25, 2017, 7:56pm
6
Thank you. It helped, actually.
Thank you. jmmann. So that’s why.
For me, before “push” this works:
$ docker login -u your_username -p your_password
We are talking about your credentials for DockerHub
More details : https://stackoverflow.com/questions/36663742/docker-unauthorized-authentication-required-upon-push-with-successful-login
ossentoo
(Ossentoo)
August 9, 2018, 4:40pm
9
this helped me too. thanks jmmann
Thx , this worked for me.
After I logged in, I tried pushing the image and it was successful
mopendra
(Mopendra Kumar)
April 29, 2024, 11:18am
14
I made only one mistake I used the capital letter of my user name, now it’s working for all lowercase