I'm pushing to a private docker repository on Docker Hub and I keep getting this error:
2726b5968341: Image successfully pushed
2fd0731064ec: Image successfully pushed
49328a658a81: Image successfully pushed
6beafaa9c78d: Image successfully pushed
bb8b822852f4: Image successfully pushed
6a0d258340b1: Pushing
FATA[0457] Failed to upload metadata: Put https://cdn-registry-1.docker.io/v1/images/6a0d258340b180fd569ec687653d805ebb70e77c1943ca6cfc9d296392ad79ee/json: dial tcp: lookup cdn-registry-1.docker.io on 192.168.1.1:53: read udp 192.168.1.1:53: i/o timeout
I'm running Docker on Mac OS using boot2docker
. After running the push
command 7+ times it finally finished successfully, but I figured I'd ask anyway.
Anyone see this before? Tips on how to resolve?
The built image is then pushed to the Docker Hub registry. You can still use docker push to push pre-built images to repositories with Automated Builds configured. If you have automated tests configured, these run after building but before pushing to the registry.
By default, “somewhere” is the Docker Hub Registry (https://hub.docker.com). However, there are ways to configure other locations from which you can pull docker images. These locations are referred to as registries.
To push an image to Docker Hub, you must first name your local image using your Docker Hub username and the repository name that you created through Docker Hub on the web. You can add multiple images to a repository by adding a specific :<tag> to them (for example docs/base:testing ).
What is a Docker Registry? A Docker registry is a storage and distribution system for named Docker images. The same image might have multiple different versions, identified by their tags. A Docker registry is organized into Docker repositories , where a repository holds all the versions of a specific image.
If you are using docker-machine, try restarting it:
docker-machine restart default
Note: default is the name of VM running the docker daemon. In case you have more than one or a different name then use the appropriate.
If you are using boot2docker, restart it:
boot2docker stop
boot2docker start
Interwebs suggest it's a network issue locally on your box; likely related to DNS. I've tried many things but restarting boot2docker fixed it.
And if you get this issue while restarting:
An error occurred trying to connect: Post https://192.168.59.103:2376/v1.19/images/create?fromImage=...: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103
Then try reinstalling boot2docker; note that you loose all your local images
boot2docker stop
boot2docker delete
boot2docker init
boot2docker start
Because of https://github.com/boot2docker/boot2docker/issues/968
Good luck
Update:
No need to boot2docker delete
anymore! A fix was merged in a latter version of boot2docker (1.7.1).
You can now boot2docker upgrade
and the issue should be fixed.
Alternatively, if that's a problem for you, you can simply bounce docker within the boot2docker VM like so:
boot2docker ssh 'sudo /etc/init.d/docker restart’
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With