The new Docker Hub is available in beta try it here
OFFICIAL REPOUpdated 2 weeks, 5 days ago

registry

Try on Desktop

Kitematic - GUI for Docker

Kitematic is not installed or is out-of-date. Click Download to install or update.

DownloadLearn More
Containerized docker registry
0293631031

Supported tags and respective Dockerfile links

For more information about this image and its history, please see the relevant manifest file (library/registry) in the docker-library/official-images GitHub repo.

Docker Registry

The tags >= 2 refer to the new registry.

Older tags refer to the deprecated registry.

Run the Registry

Run the registry docker container: Quick version

  • run the registry: docker run -p 5000:5000 -v <HOST_DIR>:/tmp/registry-dev registry
  • Modify your docker startup line/script: add “-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock –insecure-registry <REGISTRY_HOSTNAME>:5000”

Recommended: run the registry docker container

docker run \
         -e SETTINGS_FLAVOR=s3 \
         -e AWS_BUCKET=acme-docker \
         -e STORAGE_PATH=/registry \
         -e AWS_KEY=AKIAHSHB43HS3J92MXZ \
         -e AWS_SECRET=xdDowwlK7TJajV1Y7EoOZrmuPEJlHYcNP2k4j49T \
         -e SEARCH_BACKEND=sqlalchemy \
         -p 5000:5000 \
         registry

NOTE: The container will try to allocate the port 5000. If the port is already taken, find out which container is already using it by running docker ps.

Supported Docker versions

This image is officially supported on Docker version 1.7.1.

Support for older versions (down to 1.0) is provided on a best-effort basis.

User Feedback

Documentation

Documentation for this image is stored in the registry/ directory of the docker-library/docs GitHub repo. Be sure to familiarize yourself with the repository's README.md file before attempting a pull request.

Issues

If you have any problems with or questions about this image, please contact us through a GitHub issue.

You can also reach many of the official image maintainers via the #docker-library IRC channel on Freenode.

Contributing

You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.

Before you start to code, we recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.

Comments

3 weeks, 2 days ago
profile picturegarystafford

@p418. Correct. See StackOverflow answer. Only like http://localhost:5000/v2/nginx/tags/list

3 weeks, 2 days ago
profile picturegarystafford

I have create a local registry at localhost:8950 (5000 was in use). I can push and pull images to it without issue. However, once I spin up a VirtualBox VM with Docker Machine, and switch to that environment, I can no longer pull images from the repository. Is the expectation that these two applications work together? The localhost, single host scenario is the simplest test case I could create. Assuming repository is still considered 'local' to Docker Machine VM?

From with the Docker-Machine environment, when I run my docker-compose up command, I get:

gstafford@gstafford-X555LA:~/NetBeansProjects/virtual-vehicles-docker$ docker-compose -p jenkins up -d --x-smart-recreate
Building mongovalet...  
Step 0 : FROM localhost:8950/mongo:latest  
Service 'mongovalet' failed to build: invalid registry endpoint "http://localhost:8950/v0/". HTTPS attempt: unable to ping registry endpoint https://localhost:8950/v0/  
v2 ping attempt failed with error: Get https://localhost:8950/v2/: dial tcp 127.0.0.1:8950: connection refused  
 v1 ping attempt failed with error: Get https://localhost:8950/v1/_ping: dial tcp 127.0.0.1:8950: connection refused.   HTTP attempt: unable to ping registry endpoint http://localhost:8950/v0/  
v2 ping attempt failed with error: Get http://localhost:8950/v2/: dial tcp 127.0.0.1:8950: connection refused  
 v1 ping attempt failed with error: Get http://localhost:8950/v1/_ping: dial tcp 127.0.0.1:8950: connection refused

Even a direct docker pull commands get an error:

gstafford@gstafford-X555LA:~/NetBeansProjects/virtual-vehicles-docker$ docker pull localhost:8950/mongo  
Error response from daemon: invalid registry endpoint "http://localhost:8950/v0/". HTTPS attempt: unable to ping registry endpoint https://localhost:8950/v0/  
v2 ping attempt failed with error: Get https://localhost:8950/v2/: dial tcp 127.0.0.1:8950: connection refused  
 v1 ping attempt failed with error: Get https://localhost:8950/v1/_ping: dial tcp 127.0.0.1:8950: connection refused.   HTTP attempt: unable to ping registry endpoint http://localhost:8950/v0/  
v2 ping attempt failed with error: Get http://localhost:8950/v2/: dial tcp 127.0.0.1:8950: connection refused  
 v1 ping attempt failed with error: Get http://localhost:8950/v1/_ping: dial tcp 127.0.0.1:8950: connection refused

I have confirmed it works locally, outside the docker machine environments, by pulling and pushing images. The container is running fine:

gstafford@gstafford-X555LA:~/NetBeansProjects/virtual-vehicles-docker$ docker ps -a  
CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS                 PORTS                    NAMES  
590b5c060a85        registry:2          "registry cmd/regist   15 hours ago        Up 14 hours         0.0.0.0:8950->5000/tcp   registry
3 weeks, 3 days ago
profile picturep418

Ok, i'll answer myself.

there's no search endpoint in the registry v2 yet…

3 weeks, 3 days ago
profile picturep418

I set up registry with https. It works great for pushing/pulling images from.

Hovever, I am getting this error when trying to search my registry:

FATA[0000] Error response from daemon: Unexpected status code 404

I've tried tons of solutions but I still unable to make search backend works :(

here is my run options:

docker run -d -p 443:5000 --restart=always --name repo_docker \
-e SETTINGS_FLAVOR=local\
-e SEARCH_BACKEND=sqlalchemy \
-e SQLALCHEMY_INDEX_DATABASE=sqlite:////var/lib/registry/docker-registry.db \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \
-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \
-e REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/var/lib/registry \
-e DOCKER_REGISTRY_CONFIG=/var/lib/registry/config.yml \
-v /home/docker/RepoDocker:/var/lib/registry \
-v /home/docker/certificates/:/certs \
registry:2.0.1
1 month, 1 week ago
profile picturestuartwarren

@axltxl depends on the version https://github.com/docker-library/official-images/blob/master/library/registry

1 month, 3 weeks ago
profile pictureaxltxl

I'm just confused, is this the canon registry image I should use or is it the 'distribution' one?

2 months, 1 week ago
profile pictureeaoliver

For weeks I have been running a Docker registry:latest on a private server on AWS. I access it via an SSH tunnel listening on port 5000 and forwarding to localhost:5000 on the server running the Docker registry.

I'm still able to search the registry, and it returns the correct results.

curl -XGET localhost:5000/v1/search {“num_results”: 1, “query”: “”, “results”: [{“description”: null, “name”: “library/debian”}]}

However, I am unable to push or pull images from the registry. Any push or pull request returns:

FATA[0000] Error: v1 ping attempt failed with error: Get http://localhost:5000/v1/_ping: dial tcp 127.0.0.1:5000: connection refused

That's it… no additional info.

2 months, 2 weeks ago
profile pictureadnan15110

@programster I am having same issue. Does “Adding –insecure-registry” works for you. It doesn't work for me. I am badly need for the solution.

2 months, 3 weeks ago
profile pictureprogramster

How is one supposed to configure the registry with HTTPS? e.g. do I add a volume with the certificates?

Hoping this will resolve the docker push issue without adding –insecure-registry:

FATA[0010] Error response from daemon: v1 ping attempt failed with error: Get https://docker-registry.my-domain.org:5000/v1/_ping: dial tcp 54.77.228.205:5000: i/o timeout. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add --insecure-registry docker-registry.my-domain.org:5000 to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/docker-registry.my-domain.org:5000/ca.crt
3 months, 2 weeks ago
profile picturemazzolino

The instructions should be updated to reflect on the registry:2.0 tag now being available.

3 months, 3 weeks ago
profile picturetrinitronx

For those asking how to search for images stored in the registry:

Try out the docker-registry-ui project

The other 2 ways are more manual:

  1. Use the docker registry API to search curl -s -v https://my-registry.example.com:443/v1/search, get repositories and tags, or download image metadata, ancestry or layers.
  2. If you are using the S3 Storage Backend, just login to your AWS console and browse the bucket contents there. You can also use common tools such as AWS CLI or s3cmd.
7 months, 1 week ago
profile picturesalamandra

Same problem here. The easy way to fix it is reverting to 0.8.0 :/

7 months, 4 weeks ago
profile picturepmoosh

Just a note on the preload GUNICORN_OPTS=[--preload] option. It doesn't look like you can use it when running on S3, as it causes other problems.

8 months ago
profile picturelorenwest

Thank you @blinkylights23, my co-workers are laughing at me because I'm the docker proponent within our company, and getting the latest registry running has been a multi-day project due to O/S incompatibilities, and silly configuration issues like GUNICORN_OPTS, which is exactly the thing that Docker is designed to prevent.

8 months, 1 week ago
profile pictureblinkylights23

Sounds like the weird 'OperationalError:…' issue is being caused by each of the gunicorn workers racing to create a database for sqlalchemy. I got this error too, but then managed to launch a container with:

docker -e GUNICORN_OPTS=[--preload] run -p 5000:5000 registry

Better explanation: https://github.com/docker/docker-registry#sqlalchemy

8 months, 1 week ago
profile picturemarcellodesales

@hjacobs, @kevinwangcy: Is the Database problem already fixed?

8 months, 2 weeks ago
profile picturehenningsprang

Didnd't analyze the exact cause, but a hint:

I also had the “OperationalError:…” message before, when running “docker run -p 5000:5000 registry” directly.

Wondering why it happend on one machine, but not on the other, I realized that it didn't occur when i did an explicit “docker pull registry” before.

That seems to prevent the error, even though pretty unclear how and why that can be.

8 months, 2 weeks ago
profile picturekevinwangcy

I also got this error, how can I fix it?

8 months, 2 weeks ago
profile picturehjacobs

Latest version fails (locally and on AWS), error is (as already reported by vgadang):

OperationalError: (OperationalError) table version already exists u'\nCREATE TABLE version (\n\tid INTEGER NOT NULL, \n\tPRIMARY KEY (id)\n)\n\n' ()
8 months, 2 weeks ago
profile picturevgadang

Any idea on how to fix this error?

2014-11-17 19:02:06 [13] [ERROR] Exception in worker process: Traceback (most recent call last): File “/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py”, line 507, in spawn_worker worker.init_process() File “/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py”, line 193, in init_process super(GeventWorker, self).init_process() … … … File “/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py”, line 435, in do_execute cursor.execute(statement, parameters)

OperationalError: (OperationalError) table version already exists u'\nCREATE TABLE version (\n\tid INTEGER NOT NULL, \n\tPRIMARY KEY (id)\n)\n\n' ()

9 months ago
profile picturetompson

where is the 0.9.0 image? it was released yesterday

9 months ago
profile pictureimmanuel

How to view the list of images pushed inside the registry ????

11 months, 3 weeks ago
profile picturehbokh

@jjneely: Nope… can not be reproduced:

<code>core@localhost ~ $ sudo nsenter -t 3988 –mount –uts –ipc –net –pid /bin/bash groups: cannot find name for group ID 11 root@71f544be5723:/# </code>

1 year ago
profile picturejjneely

Running the 0.7.3 image, there seems to be something strange with the libraries inside the running container that prevents nsenter from creating a bash process:

nsenter –target 21011 –mount –uts –ipc –net –pid /bin/bash

/bin/bash: error while loading shared libraries: /lib/x86_64-linux-gnu/libtinfo.so.5: invalid ELF header

Can anyone reproduce?

1 year, 1 month ago
profile picturejoffrey

You guys probably have noticed, but 0.7.1, 0.7.2 and 0.7.3 have been there for a week or so already =) Just wanted to clarify for people who just arrived!

@lemonbar, you'll want to look at enabling the indexing module and using the /v1/search endpoint. HTH!

1 year, 1 month ago
profile picturelemonbar

How to search images in the own registry we started?

1 year, 1 month ago
profile picturerojaro

Please update this image … you've skipped 0.7.1 already so please upload 0.7.2

1 year, 1 month ago
profile picturetopicusonderwijs

Yes, please, 0.7.1 :D

1 year, 1 month ago
profile picturetclavier

It's possible to build last tag 0.7.1 ?

Properties


Settings