Distribution Registry: Difference between revisions
m (Ovidiu moved page Distribution to Distribution Registry without leaving a redirect) |
|||
Line 4: | Line 4: | ||
=Internal= | =Internal= | ||
* [[Docker_Concepts#Local_Image_Registry_.28Docker_Registry.29|Docker Concepts | Local Image Registry]] | * [[Docker_Concepts#Local_Image_Registry_.28Docker_Registry.29|Docker Concepts | Local Image Registry]] | ||
=Old Content (TO REFACTOR)= | |||
<font color=darkkhaki> | |||
{{External|https://docs.docker.com/registry/}} | |||
Docker caches images downloaded from remote repositories locally, in a local registry. This local registry is also referred to as Docker's local storage area, and it usually lives under /var/lib/docker. Depending on the [[#Storage_Driver|storage driver]] in use, the local storage area is mounted under /var/lib/docker/devicemapper, /var/lib/docker/overlay, etc. The content of the local registry can be queried with [[Docker images#Overview|docker images]]. Images can be removed from the local registry with [[Docker rmi#Overview|docker rmi]]. | |||
===<span id='Exposing_the_Content_of_the_Local_Image_Registry_over_TCP_with_Docker_Registry'></span>Docker Registry - Exposing the Content of the Local Image Registry over TCP=== | |||
{{External|https://docs.docker.com/registry}} | |||
The content of the local image registry can be exposed over the network, in a conceptually similar manner to how [[#Docker_Hub|Docker Hub]] is doing it. This is done by a "registry" container, whose image can be pulled from [[#Docker_Hub|Docker Hub]]. According to Docker documentation, "the Registry is a stateless, highly scalable server side application that stores and lets you distribute Docker image." | |||
Note that by default the Docker Registry container starts with HTTP support only, so all other Docker servers that use it must be configured to allow it as an "insecure registry", with <tt>--insecure-registry</tt> as described [[Docker_Server_Configuration#--insecure-registry|here]]. | |||
By default, the registry data is persisted as a Docker volume on the local host filesystem, in a directory structure similar to the one shown below. The location can be customized as shown [[Docker_Registry_Operations#Customize_Storage_Location|here]]. | |||
<syntaxhighlight lang='bash'> | |||
# tree ./local-registry/ | |||
./local-registry/ | |||
└── docker | |||
└── registry | |||
└── v2 | |||
├── blobs | |||
│ └── sha256 | |||
│ ├── 3f | |||
│ │ └── 3fd9065eaf02feaf94d68376da52541925650b81698c53c6824d92ff63f98353 | |||
│ │ └── data | |||
│ ├── 8c | |||
│ │ └── 8c03bb07a531c53ad7d0f6e7041b64d81f99c6e493cb39abba56d956b40eacbc | |||
│ │ └── data | |||
│ └── ff | |||
│ └── ff3a5c916c92643ff77519ffa742d3ec61b7f591b6b7504599d95a4a41134e28 | |||
│ └── data | |||
└── repositories | |||
└── test | |||
├── _layers | |||
│ └── sha256 | |||
│ ├── 3fd9065eaf02feaf94d68376da52541925650b81698c53c6824d92ff63f98353 | |||
│ │ └── link | |||
│ └── ff3a5c916c92643ff77519ffa742d3ec61b7f591b6b7504599d95a4a41134e28 | |||
│ └── link | |||
├── _manifests | |||
│ ├── revisions | |||
│ │ └── sha256 | |||
│ │ └── 8c03bb07a531c53ad7d0f6e7041b64d81f99c6e493cb39abba56d956b40eacbc | |||
│ │ └── link | |||
│ └── tags | |||
│ └── latest | |||
│ ├── current | |||
│ │ └── link | |||
│ └── index | |||
│ └── sha256 | |||
│ └── 8c03bb07a531c53ad7d0f6e7041b64d81f99c6e493cb39abba56d956b40eacbc | |||
│ └── link | |||
└── _uploads | |||
</syntaxhighlight> | |||
For details on how to operate the registry, see: | |||
{{Internal|Docker Registry Operations#Overview|Docker Registry Operations}} | |||
===Docker Registry as a Pull-Through Cache=== | |||
{{External|https://docs.docker.com/registry/recipes/mirror/}} | |||
</font> |
Revision as of 19:17, 8 December 2023
External
Internal
Old Content (TO REFACTOR)
Docker caches images downloaded from remote repositories locally, in a local registry. This local registry is also referred to as Docker's local storage area, and it usually lives under /var/lib/docker. Depending on the storage driver in use, the local storage area is mounted under /var/lib/docker/devicemapper, /var/lib/docker/overlay, etc. The content of the local registry can be queried with docker images. Images can be removed from the local registry with docker rmi.
Docker Registry - Exposing the Content of the Local Image Registry over TCP
The content of the local image registry can be exposed over the network, in a conceptually similar manner to how Docker Hub is doing it. This is done by a "registry" container, whose image can be pulled from Docker Hub. According to Docker documentation, "the Registry is a stateless, highly scalable server side application that stores and lets you distribute Docker image."
Note that by default the Docker Registry container starts with HTTP support only, so all other Docker servers that use it must be configured to allow it as an "insecure registry", with --insecure-registry as described here.
By default, the registry data is persisted as a Docker volume on the local host filesystem, in a directory structure similar to the one shown below. The location can be customized as shown here.
# tree ./local-registry/
./local-registry/
└── docker
└── registry
└── v2
├── blobs
│ └── sha256
│ ├── 3f
│ │ └── 3fd9065eaf02feaf94d68376da52541925650b81698c53c6824d92ff63f98353
│ │ └── data
│ ├── 8c
│ │ └── 8c03bb07a531c53ad7d0f6e7041b64d81f99c6e493cb39abba56d956b40eacbc
│ │ └── data
│ └── ff
│ └── ff3a5c916c92643ff77519ffa742d3ec61b7f591b6b7504599d95a4a41134e28
│ └── data
└── repositories
└── test
├── _layers
│ └── sha256
│ ├── 3fd9065eaf02feaf94d68376da52541925650b81698c53c6824d92ff63f98353
│ │ └── link
│ └── ff3a5c916c92643ff77519ffa742d3ec61b7f591b6b7504599d95a4a41134e28
│ └── link
├── _manifests
│ ├── revisions
│ │ └── sha256
│ │ └── 8c03bb07a531c53ad7d0f6e7041b64d81f99c6e493cb39abba56d956b40eacbc
│ │ └── link
│ └── tags
│ └── latest
│ ├── current
│ │ └── link
│ └── index
│ └── sha256
│ └── 8c03bb07a531c53ad7d0f6e7041b64d81f99c6e493cb39abba56d956b40eacbc
│ └── link
└── _uploads
For details on how to operate the registry, see:
Docker Registry as a Pull-Through Cache