Create private repository
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
$ docker run -d -p 3000:3000 --name repositorio-docker jbrunk/repositorio-docker
With this you can just skip to Creating User.
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
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
Now you are ready to create users. To register a new user, you can use the docker client.
$ docker login -e firstname.lastname@example.org -p some-save-password -u some-user http://myserver:3000/v1/
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
Pulling an image is similar to pushing images.
$ docker pull myserver:3000/ubuntu
If you don't use SSL encryption you have to add the following option to your docker daemons options: