6

I am trying to run a local Docker Registry with a synchronized storage with my Dropbox so I can have access to built VMs without having to rebuild the images if I move to a different work station.

I have launched the Registry with the following:

docker run -d -p 5000:5000 --name td-registry -v /Users/andrew/Dropbox/Developer/Docker/Registry:/tmp/registry registry

Then, I push an example image that I have built via:

docker push localhost:5000/ubunutu

Now, I would expect to see some sort of file or directory placed into /Users/andrew/Dropbox/Developer/Docker/Registry; but that is not the case:

$ ls -lah ~/Dropbox/Developer/Docker/Registry
total 0
drwxr-xr-x  2 andrew  staff    68B Sep 24 14:39 .
drwxr-xr-x  4 andrew  staff   136B Sep 24 16:42 ..

Am I mounting the data volume incorrectly when launching the Registry container?

Edit

Here is the output of the docker push, so it's successfully pushing.

The push refers to a repository [localhost:5000/ubuntu] (len: 1)
Sending image list
Pushing repository localhost:5000/ubuntu (1 tags)
511136ea3c5a: Image successfully pushed
bfb8b5a2ad34: Image successfully pushed
c1f3bdbd8355: Image successfully pushed
897578f527ae: Image successfully pushed
9387bcc9826e: Image successfully pushed
809ed259f845: Image successfully pushed
96864a7d2df3: Image successfully pushed
a037e7415015: Image successfully pushed
922d395cc25c: Image successfully pushed
f9317ffe9a11: Image successfully pushed
1a980360e853: Image successfully pushed
f759631e9b64: Image successfully pushed
194edb5b619b: Image successfully pushed
5cf96e6ae328: Image successfully pushed
b4d4b1e2e0b3: Image successfully pushed
921507f17768: Image successfully pushed
b9faffd3f579: Image successfully pushed
Pushing tag for rev [b9faffd3f579] on {http://localhost:5000/v1/repositories/ubuntu/tags/latest}
4

If you're using the official registry image, the path at which the local volumes are stored by default is /tmp/registry. Thus that should be your mount point.

docker run -d -p 5000:5000 --name td-registry -v /Users/andrew/Dropbox/Developer/Docker/Registry:/tmp/registry registry

This is covered in the persistent storage section of the main readme.

  • This still does not work. Running that exact configuration still results in /Users/andrew/Dropbox/Developer/Docker/Registry to be empty after I do docker push localhost:5000/ubuntu. And yes, I am using the official registry container. I also tried -v /tmp/registry:/tmp/registry for the heck of it, and same thing, /tmp/registry on my laptop is empty after a docker push. Updated the OP to show the output of the docker push, – Andrew Ellis Sep 25 '14 at 3:21
  • 1
    isn't it /var/lib/registry ? – Dimitri Kopriwa Dec 7 '15 at 15:08
0

The problem was boot2docker. The folders were being mounted from the boot2docker image to the container. There is no easy way to mount folders to the boot2docker image that I'm aware of.

My fix was to drop boot2docker and bring up an additional Vagrant CoreOS VM that runs a single Registry container with a mounted folder that way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.