2016-09-29 19:21:06 +00:00
|
|
|
---
|
|
|
|
description: describes get by digest pitfall
|
2016-11-10 19:54:25 +00:00
|
|
|
keywords: registry, manifest, images, tags, repository, distribution, digest
|
2016-11-04 22:38:40 +00:00
|
|
|
title: Registry compatibility
|
2016-09-29 19:21:06 +00:00
|
|
|
---
|
2016-09-28 21:46:28 +00:00
|
|
|
|
2020-07-03 14:25:54 +00:00
|
|
|
{% include registry.md %}
|
|
|
|
|
2016-09-28 21:46:28 +00:00
|
|
|
## Synopsis
|
2018-01-26 01:37:23 +00:00
|
|
|
If a manifest is pulled by _digest_ from a registry 2.3 with Docker Engine 1.9
|
2016-09-28 21:46:28 +00:00
|
|
|
and older, and the manifest was pushed with Docker Engine 1.10, a security check
|
2018-01-26 01:37:23 +00:00
|
|
|
causes the Engine to receive a manifest it cannot use and the pull fails.
|
2016-09-28 21:46:28 +00:00
|
|
|
|
2017-08-23 23:29:19 +00:00
|
|
|
## Registry manifest support
|
2016-09-28 21:46:28 +00:00
|
|
|
|
|
|
|
Historically, the registry has supported a [single manifest type](./spec/manifest-v2-1.md)
|
|
|
|
known as _Schema 1_.
|
|
|
|
|
2018-01-26 01:37:23 +00:00
|
|
|
With the move toward multiple architecture images, the distribution project
|
|
|
|
introduced two new manifest types: Schema 2 manifests and manifest lists. Registry
|
|
|
|
2.3 supports all three manifest types and sometimes performs an on-the-fly
|
|
|
|
transformation of a manifest before serving the JSON in the response, to
|
2018-02-22 12:32:20 +00:00
|
|
|
preserve compatibility with older versions of Docker Engine.
|
2016-09-28 21:46:28 +00:00
|
|
|
|
|
|
|
This conversion has some implications for pulling manifests by digest and this
|
2017-08-23 23:29:19 +00:00
|
|
|
document enumerates these implications.
|
2016-09-28 21:46:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Content Addressable Storage (CAS)
|
|
|
|
|
|
|
|
Manifests are stored and retrieved in the registry by keying off a digest
|
2017-06-02 17:01:29 +00:00
|
|
|
representing a hash of the contents. One of the advantages provided by CAS is
|
2018-01-26 01:37:23 +00:00
|
|
|
security: if the contents are changed, then the digest no longer matches.
|
2016-09-28 21:46:28 +00:00
|
|
|
This prevents any modification of the manifest by a MITM attack or an untrusted
|
|
|
|
third party.
|
|
|
|
|
|
|
|
When a manifest is stored by the registry, this digest is returned in the HTTP
|
2017-06-02 17:01:29 +00:00
|
|
|
response headers and, if events are configured, delivered within the event. The
|
2016-09-28 21:46:28 +00:00
|
|
|
manifest can either be retrieved by the tag, or this digest.
|
|
|
|
|
2018-01-26 01:37:23 +00:00
|
|
|
For registry versions 2.2.1 and below, the registry always stores and
|
|
|
|
serves _Schema 1_ manifests. Engine 1.10 first
|
|
|
|
attempts to send a _Schema 2_ manifest, falling back to sending a
|
2016-09-28 21:46:28 +00:00
|
|
|
Schema 1 type manifest when it detects that the registry does not
|
|
|
|
support the new version.
|
|
|
|
|
|
|
|
|
|
|
|
## Registry v2.3
|
|
|
|
|
2017-08-23 23:29:19 +00:00
|
|
|
### Manifest push with Docker 1.10
|
2016-09-28 21:46:28 +00:00
|
|
|
|
2018-01-26 01:37:23 +00:00
|
|
|
The Engine constructs a _Schema 2_ manifest which the
|
|
|
|
registry persists to disk.
|
2016-09-28 21:46:28 +00:00
|
|
|
|
|
|
|
When the manifest is pulled by digest or tag with Docker Engine 1.10, a
|
2018-01-26 01:37:23 +00:00
|
|
|
_Schema 2_ manifest is returned. Docker Engine 1.10
|
2016-09-28 21:46:28 +00:00
|
|
|
understands the new manifest format.
|
|
|
|
|
|
|
|
When the manifest is pulled by *tag* with Docker Engine 1.9 and older, the
|
|
|
|
manifest is converted on-the-fly to _Schema 1_ and sent in the
|
2017-06-02 17:01:29 +00:00
|
|
|
response. The Docker Engine 1.9 is compatible with this older format.
|
2016-09-28 21:46:28 +00:00
|
|
|
|
2018-01-26 01:37:23 +00:00
|
|
|
When the manifest is pulled by _digest_ with Docker Engine 1.9 and older, the
|
|
|
|
same rewriting process does not happen in the registry. If it did,
|
2016-09-28 21:46:28 +00:00
|
|
|
the digest would no longer match the hash of the manifest and would violate the
|
2018-01-26 01:37:23 +00:00
|
|
|
constraints of CAS.
|
2016-09-28 21:46:28 +00:00
|
|
|
|
|
|
|
For this reason if a manifest is pulled by _digest_ from a registry 2.3 with Docker
|
|
|
|
Engine 1.9 and older, and the manifest was pushed with Docker Engine 1.10, a
|
2018-01-26 01:37:23 +00:00
|
|
|
security check causes the Engine to receive a manifest it cannot use and the
|
|
|
|
pull fails.
|
2017-08-23 23:29:19 +00:00
|
|
|
|
|
|
|
### Manifest push with Docker 1.9 and older
|
|
|
|
|
2018-01-26 01:37:23 +00:00
|
|
|
The Docker Engine constructs a _Schema 1_ manifest which the
|
|
|
|
registry persists to disk.
|
2017-08-23 23:29:19 +00:00
|
|
|
|
2018-02-22 12:32:20 +00:00
|
|
|
When the manifest is pulled by digest or tag with any Docker version, a
|
2018-01-26 01:37:23 +00:00
|
|
|
_Schema 1_ manifest is returned.
|
2017-08-23 23:29:19 +00:00
|
|
|
|