I have built a docker image and have committed the changes, and am attempting to push the image to my public docker hub account.
When attempting to push the image to the docker hub registry it seems to try utilise my hub username as a private server address.
What i have done done so far is run a fedora base image, make my changes and then commit the changed using docker commit dd09de55abc9 username/fedora-23-httpd
When i do this and check the image using docker images i get the output:
# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
/username/fedora-23-httpd latest 0b9b4d0b820e 21 seconds ago 468.5 MB
Then when running docker push username/fedora-23-httpd i get the message:
The push refers to a repository [username/fedora-23-httpd] (len: 1)
unable to ping registry endpoint https://username/v0/
v2 ping attempt failed with error: Get https://username/v2/: dial tcp: lookup username: No address associated with hostname
v1 ping attempt failed with error: Get https://username/v1/_ping: dial tcp: lookup username: No address associated with hostname
From other tutorials I have read my commands appear to be correct, but the output of the images command shows the repository name with a / at the start.
I’ve also tried the command docker commit dd09de55abc9 docker.io/username/fedora-23-httpd which seems to correct the proceeding / in the images list, but still generates the same message when attempting to push the image to docker hub.
I think 2 things you need to confirm.
1.Ensure you use "docker login" to get authentication.
2.Ensure you've created a repository named "username/fedora-23-httpd"(same with your images tag) in docker hub website.
Hope this will be useful for you.
When i run the command “docker commit dd09de55abc9 username/fedora-23-httpd” the system puts that there
When i run the command “docker commit dd09de55abc9 docker.io/username/fedora-23-httpd” - it lists it correctly without the proceeding / - but the same issue occurs where it tries to connect to a server with my username rather than the docker hub.
Same problem here (once with a private and once with a public repository:
[root@svgator test]# docker login
Username: reinhapa
Password:
Email: patrick@reini.net
WARNING: login credentials saved in /root/.docker/config.json
Login Succeeded
[root@svgator test]# docker push reinhapa/test
The push refers to a repository [docker.io/reinhapa/test] (len: 0)
63f1f8b3d4cb: Preparing
unauthorized: access to the requested resource is not authorized
[root@svgator test]# docker push reinhapa/myimage
The push refers to a repository [docker.io/reinhapa/myimage] (len: 0)
63f1f8b3d4cb: Preparing
unauthorized: access to the requested resource is not authorized
[root@svgator test]# docker version
Client:
Version: 1.9.1-fc23
API version: 1.21
Package version: docker-1.9.1-4.git6ec29ef.fc23.x86_64
Go version: go1.5.1
Git commit: 110aed2-dirty
Built: Wed Dec 9 09:09:16 UTC 2015
OS/Arch: linux/amd64
Server:
Version: 1.9.1-fc23
API version: 1.21
Package version: docker-1.9.1-4.git6ec29ef.fc23.x86_64
Go version: go1.5.1
Git commit: 110aed2-dirty
Built: Wed Dec 9 09:09:16 UTC 2015
OS/Arch: linux/amd64
On my Mac with docker machine login fails:
Patricks-MacBook-Air:test pr$ docker login
Username: reinhapa
Password:
Email: patrick@reini.net
Error response from daemon: Server Error: Post https://index.docker.io/v1/users/: dial tcp: lookup index.docker.io on 83.144.199.72:53: server misbehaving
Patricks-MacBook-Air:test pr$ docker version
Client:
Version: 1.9.0
API version: 1.21
Go version: go1.4.3
Git commit: 76d6bc9
Built: Tue Nov 3 19:20:09 UTC 2015
OS/Arch: darwin/amd64
Server:
Version: 1.9.0
API version: 1.21
Go version: go1.4.3
Git commit: 76d6bc9
Built: Tue Nov 3 19:20:09 UTC 2015
OS/Arch: linux/amd64
Mine has been solved now. Was due to the version of docker that comes with Fedora - I’ve uninstalled docker and re-installed using the scripts supplied by docker wget -qO- https://get.docker.com/ | sh