2016-09-29 19:21:06 +00:00
---
2016-11-10 19:54:25 +00:00
description: High-level overview of the Registry
keywords: registry, on-prem, images, tags, repository, distribution
2023-10-12 10:39:36 +00:00
title: Distribution Registry
2016-09-29 19:21:06 +00:00
---
2016-09-28 21:46:28 +00:00
## What it is
2016-11-04 22:38:40 +00:00
The Registry is a stateless, highly scalable server side application that stores
2023-10-12 10:39:36 +00:00
and lets you distribute container images. The Registry is open-source, under the
2020-10-13 09:59:31 +00:00
permissive [Apache license ](https://en.wikipedia.org/wiki/Apache_License ).
2016-09-28 21:46:28 +00:00
## Why use it
You should use the Registry if you want to:
* tightly control where your images are being stored
* fully own your images distribution pipeline
* integrate image storage and distribution tightly into your in-house development workflow
## Alternatives
2016-11-04 22:38:40 +00:00
Users looking for a zero maintenance, ready-to-go solution are encouraged to
2023-10-12 10:39:36 +00:00
use one of the existing registry services. Many of these provide support and security
scanning, and are free for public repositories. For example:
- [Docker Hub ](https://hub.docker.com )
- [Quay.io ](https://quay.io/ )
- [GitHub Packages ](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry )
2016-09-28 21:46:28 +00:00
2023-10-12 10:39:36 +00:00
Cloud infrastructure providers such as [AWS ](https://aws.amazon.com/ecr/ ), [Azure ](https://azure.microsoft.com/products/container-registry/ ), [Google Cloud ](https://cloud.google.com/artifact-registry ) and [IBM Cloud ](https://www.ibm.com/products/container-registry ) also have container registry services available at a cost.
2016-09-28 21:46:28 +00:00
2023-10-12 10:39:36 +00:00
## Compatibility
The distribution registry implements the [OCI Distribution Spec ](https://github.com/opencontainers/distribution-spec ) version 1.0.1.
2016-09-28 21:46:28 +00:00
2017-12-08 22:34:57 +00:00
## Basic commands
2016-09-28 21:46:28 +00:00
Start your registry
2023-10-12 07:32:37 +00:00
```sh
docker run -d -p 5000:5000 --name registry registry:2
```
2016-09-28 21:46:28 +00:00
Pull (or build) some image from the hub
2023-10-12 07:32:37 +00:00
```sh
docker pull ubuntu
```
2016-09-28 21:46:28 +00:00
Tag the image so that it points to your registry
2023-10-12 07:32:37 +00:00
```sh
docker image tag ubuntu localhost:5000/myfirstimage
```
2016-09-28 21:46:28 +00:00
Push it
2023-10-12 07:32:37 +00:00
```sh
docker push localhost:5000/myfirstimage
```
2016-09-28 21:46:28 +00:00
Pull it back
2023-10-12 07:32:37 +00:00
```sh
docker pull localhost:5000/myfirstimage
```
2016-09-28 21:46:28 +00:00
Now stop your registry and remove all data
2023-10-12 07:32:37 +00:00
```sh
docker container stop registry & & docker container rm -v registry
```
2016-09-28 21:46:28 +00:00
## Next
2023-10-12 07:32:37 +00:00
You should now read the [detailed introduction about the registry ](about ),
or jump directly to [deployment instructions ](about/deploying ).