Published

Docker Registry Rest API

The Docker Registry

The Docker registry is Docker’s in-build way to share images. It is an open-source project and can be found at https://github.com/dotcloud/docker-registry in the official repository of DotCloud. You can set it up on your private server (maybe in the cloud) at push and pull your images to it. You can also secure it, e.g. with SSL and a NGINX (maybe I will write about this later).

The Rest API

Similar to Docker itself, the registry provides a Rest API to interact with it. Using the Rest API, you can list all images, search or brows a certain repository. The only prerequisite is that you define a search back-end in the registry’s config.yaml:

1

2

3

4

common:

# add this

search_backend:sqlalchemy

sqlalchemy_index_database:sqlite:////tmp/docker-registry.db

Now you can use the Rest API like this:

List a certain repository

1

2

3

4

5

6

7

8

9

GET https://my-private-registry.com/v1/repositories/thomas/busybox/images