简体   繁体   中英

docker push to private registry hangs

I have setup, both the repl supplied docker-registry and the official docker registry image from docker hub both have the same issue I am seeing.

I have an image which I have tagged with the docker registry hostname and port etc, and try and push it to the registry.

On hitting enter, it appears to run ok, checking for image layers the registry already has. Once it starts to push an image layer it doesn't have, it hangs; and stays there, forever until I ctrl+c out of it

Example:

[root@docker1 ~]# docker push docker1:5000/centos:7
The push refers to a repository [docker1:5000/centos] (len: 1)
Sending image list
Pushing repository docker1:5000/centos (1 tags)
Image 511136ea3c5a already pushed, skipping
Image 5b12ef8fd570 already pushed, skipping
5c5681003a50: Pushing [>                                                  ] 1.584 MB/220.5 MB 2m9s

In the docker logs for the docker-registry container thats running, it has:

10.10.10.2 - - [06/Apr/2015:17:11:01 +0000] "PUT /v1/images/f6808a3e4d9e80a655ec625e38b869ed8a614611e4d0073aeff23be841c9fcff/json HTTP/1.1" 200 4 "-" "docker/1.1.1 go/go1.2.1 git-commit/bd609d2 kernel/3.15.3-tinycore64 os/linux arch/amd64"
06/Apr/2015:17:11:02 +0000 DEBUG: args = {'image_id': u'f6808a3e4d9e80a655ec625e38b869ed8a614611e4d0073aeff23be841c9fcff'}

and no errors as far as I can see.

I have tried pushing from a remote server on and locally to itself, and still the same. iptables is off, as is selinux.

Not really sure what else to try.

Regards, K

I did find out in my tests, that if I pushed to localhost it would work fine, but going via the main interface it would fail. Again no IPTables etc running.

I have got around the problem, by pulling the nginx image, and running that a proxy_pass on that to the registry.

I did have to set

client_max_body_size 0;

as was getting 411 Length Required' errors, initially.

This is a happy workaround, as I would eventually like to put htaccess in front of it anyway, so C'est la vie.

K

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM