Navigation Menu


One of the key advantages of using Docker is it’s centralized image management server, called a Registry Server. The Docker project, as well as Red Hat, maintain public registry servers which host supported images. The Docker project also provides an Open Source version of the Registry server which can be deployed on premise in your own network.


As I mentioned in my original article, one of the first things a user wants to do after learning about Docker, is fire up a Registry server. This allows one to create derivative works with Docker files, and push them somewhere to be consumed again and again, by themselves and others.



Use Cases

  • I have pulled the offical RHEL or Fedora image, modified it with a Dockerfile and now I want to save it somewhere.
  • I need a place to share the images I have created with others
  • I want something that is easy to maintain and upgrade


A containerized version of the the Docker Registry is provided by the Docker team. This server is written in Python and the version at the time of this writing was 0.8.1. This server is now being referred to as the V1 server. It’s important to not that this server is delivered as a Docker image.

The V1 Docker Registry Server has been recently put into maintenance because the V2 server will now be where active development happens. That said, the V1 Registry server will be the current stable version for the foreseeable future and will receive security patches, etc.


Basic Operations

Install the Registry Container

The Docker Registry server provided as a repository with layers for each version released


Basic Deployment

This will manually start the container in daemon mode. Notice the -p option will map port 5000 in the container to the underlying operating system. This means you will access the registry server as if it is installed and running on the underlying OS.

Advanced Operations

Registry Deployment (Manual)

This will create a fairly functional Registry container that can be used for longer term hosting of repositories. The -e option sets an environmental variable inside the container, while the -v option maps a volume into the Docker container

Registry Deployment on RHEL7 (Container)

Create a unit file

ExecStart=/usr/bin/docker run -d -p 5000:5000 -e SEARCH_BACKEND=sqlalchemy -e DOCKER_REGISTRY_CONFIG=/srv/docker/conf.d/config.yml -v /srv/docker/registry:/srv/docker/registry -v /srv/docker/conf.d:/srv/docker/conf.d –name=docker-registry-container registry
ExecStop=/usr/bin/docker stop docker-registry-container
ExecStopPost=/usr/bin/docker rm docker-registry-container


Registry Deployment on RHEL6 (Container)

To deploy on RHEL6, it is necessary to create an init script similar to the following

# Source function library.
. /etc/rc.d/init.d/functions


start() {
echo -n $”Starting $prog: ”
/usr/bin/docker run -d -p 5000:5000 -e SEARCH_BACKEND=sqlalchemy -e DOCKER_REGISTRY_CONFIG=/srv/docker/conf.d/config.yml -v /srv/docker/registry:/srv/docker/registry -v /srv/docker/conf.d:/srv/docker/conf.d –name=docker-registry-container registry

stop() {
echo -n $”Stopping $prog: ”
/usr/bin/docker stop docker-registry-container
/usr/bin/docker rm docker-registry-container

restart() {

status() {
/usr/bin/docker ps docker-registry-container

case “$1″ in
echo $”Usage: $0 {start|stop|status|restart}”
exit 2
exit $?

Registry Deployment on RHEL7 (RPM Package)

The Docker Registry server is also provided as an RPM with configuration in a manner similar to other RHEL services.

Install Docker Registry

Create custom data directory

Modify the configuration file

Enable and start service


  1. Running Docker in Production | Crunch Tools - […] A Practical Introduction to the Docker Registry Server […]
  2. Core Builds in the Age of Service | Crunch Tools - […] to describe business solutions such as a ticket system, as well as, technical solutions such as a Docker Registry…

Post a Reply

Your email address will not be published.