Create a private docker registry

To create a private docker registry you just need repositor.io and some place to store the images.

The current stable version of repositor.io only support docker API v1.

Using a demo docker container

If you don't want to setup everything manually or just want to play a bit, you can also use a preconfigured docker container. Many thanks to Jürgen Brunk for the contribution.

$ docker run -d -p 3000:3000 --name repositorio-docker jbrunk/repositorio-docker

With this you can just skip to Creating User.

Manually configuration

First you need to configure the docker repository inside your /etc/repositorio.conf file.

<Repository docker>
    local = docker
    type  = Docker
</Repository>

Now you can initialize the repository as usual. This will create a docker directory under your RepositoryRoot.

$ repositorio --repo=docker --init

Serving Content

To get your Docker registry up and running you need to start a webserver to serve the content. You can't use a plain Apache or nginx server to serve the content because the docker client is not just downloading files like yum or apt. So repositor.io is comming with an integrated webserver.

$ repositorio --repo=docker --server prefork

This will start a preforking webserver on port 3000. If you want to use another port you can get help for all the parameters with the following command.

$ repositorio --repo=docker --server prefork -- --help

Creating User

Now you are ready to create users. To register a new user, you can use the docker client.

$ docker login -e some@mail.tld -p some-save-password -u some-user http://myserver:3000/v1/

Push Images

After create a user you'll be able to push and pull images into repositor.io.

First, download an image from the official docker registry.

$ docker pull ubuntu

Now you have to tag the image with a special name. You have to include the domain of your private registry in the tag name.

$ docker tag myserver:3000/ubuntu

After tagging your image, you can push it to your repositor.io server.

$ docker push myserver:3000/ubuntu

Pull Images

Pulling an image is similar to pushing images.

$ docker pull myserver:3000/ubuntu

Have Problems?

If you don't use SSL encryption you have to add the following option to your docker daemons options:

--insecure-registry myserver:3000

If you have problems, questions or suggestions, feel free to open an issue on Github and/or join our irc channel on irc.freenode.net channel #rex.