-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Description
Pushing / pulling from a private registry does not seem to be working as I would expect. Here is the setup:
I have an image I built, tagged with <hostname>/meltmedia/base
where <hostname>
points to a instance of the registry running, backed by s3, proxied with nginx.
When I do a docker push <hostname>/meltmedia/base
I get output such as:
vagrant@vagrant-ubuntu-raring-64:/vagrant/meltmedia-base$ docker push <hostname>/meltmedia/base
The push refers to a repository [<hostname>/meltmedia/base] (len: 1)
Processing checksums
Sending image list
Pushing repository <hostname>/meltmedia/base (1 tags)
Pushing 7552a9e2b58881d086ff09179118bf07911cc85714cafd3e4082f73f7f23368a
This is where it starts to get odd, this operation is very quick. Looking at S3, only a _index_images
file is written under a path of meltmedia/base
. I would expect the actual layers to have been written as well.
To ensure that I wasn't simply missing something, I removed the images from my local docker instance using docker rmi
. A docker images
show that the build is indeed been removed.
I then proceeded to do a docker pull <hostname>/meltmedia/base
where I get the following output:
vagrant@vagrant-ubuntu-raring-64:/vagrant/meltmedia-base$ docker pull <hostname>/meltmedia/base
Pulling repository <hostname>/meltmedia/base
After this a docker images
does not show the meltmedia/base image as I would expect.
Inspecting the logs of the registry I notice 404's being returned when requesting the ancestry:
"[10/Aug/2013:00:45:58] "GET /v1/images/meltmedia/base/ancestry HTTP/1.0" 404 233 "-" "docker/0.5.1 go/go1.1 kernel/3.8.0-27-generic"
Is this a bug? Configuration issue?
I am using docker 0.5.1, docker-registry 0.5.5. Note, I have tried 0.5.2 with no luck either.
Regards,
Mike
Activity
creack commentedon Aug 10, 2013
/cc @samalba
samalba commentedon Aug 10, 2013
Hi Mike,
it's hard to say at this point. Could you give me some logs written when you trigger the push? Especially the logs from nginx and the registry app.
A known problem is that nginx < 1.3.9 does not support chunked encoding, which is required by Docker.
mmoulton commentedon Aug 10, 2013
Thanks for the quick response. I have confirmed I am using the nginx 1.4 series. Log are as follows...
docker.log from executing
docker push <hostname>/meltmedia/base
nginx access.log:
registry log:
Let me know if there is anything else I can provide that might help debug this.
-- Mike
mmoulton commentedon Aug 10, 2013
I was able to get pushing to a private registry to work by removing nginx from the chain. Regardless of the version of nginx, I could not get past the initial PUT request. The nginx config was as described by
docker-registry
:I have ended up with hipache in front of gunicorn as there seems to be a ssl(?) check occurring in the beginning of the push that causes a plain gunicorn to not fail fast and requires the worker to exhaust it's timeout before starting the push. This check fails fast with hipache.
samalba commentedon Aug 13, 2013
We're using hipache + gunicorn on prod. @sdouche got nginx working (cf. docker mailing list) with the following options:
I am still looking for a good nginx config file to contribute to the docker-registry repos. If it works for you too, let me know.
mmoulton commentedon Aug 17, 2013
Since this is working with hipache + gunicorn I'm going to close this down. Thanks!
denmat commentedon Sep 17, 2013
FYI -- I followed this thread but needed the following:
ubuntu - nginx-extras installed.
sdouche commentedon Sep 17, 2013
uh?! @denmat can you explain why you need these lines?
denmat commentedon Sep 18, 2013
I'm not really sure why I needed them, but they worked :)
Here is my vanilla nginx reverse proxy set up (nothing else running on nginx), everything else is default out of the box.
Results:
With the following set ...
And with the following set ...
This is running the latest samalba/docker-registry without modification (runs in the Dev environment mode).
sudo docker version
Client version: 0.6.1
Server version: 0.6.1
Git commit: 5105263
Go version: go1.1.2
Size of the image is around 800M.
use extras because of moby/moby#1486
Merge pull request #35797 from bacongobbler/registry-proxy