Allows management of referrer objects when performing
pull, archive export and archive import.
Referrer objects are linked to their subjects via GC
labels. The label is based on sha256 checksum of the
object instead of incremental numbers as referrers are
not immutable and don't have any strict order.
In OCI-layout referrers that are not already in the exported
tree are added to the main index.json with
io.containerd.manifest.subject annotation.
On import such descriptors with that annotation
do not create digest-based images in the image store.
Note that this does not mean all the referrer objects in
the registry are now pulled/exported/imported by default.
The caller of the client pkg functions can choose which
referrer objects should also be handled.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Schema 1 (`application/vnd.docker.distribution.manifest.v1+prettyjws`) has been
officially deprecated since containerd v1.7 (PR 6884), and disabled since v2.0 (PR 9765).
Users who have been seeing warnings like `conversion from schema 1 images is deprecated`
now have to rebuild the image with Schema 2 or OCI.
Schema 2 was introduced in Docker 1.10 (Feb 2016), so most users should have been already
using Schema 2 or OCI.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
the client package provides a WithDialOpts option, however, dial-options
passed to override all defaults that are set in containerd. This makes it
difficult to expand the defaults with custom options, as this requires
copying the defaults, and trying to keep those in sync (e.g. see [moby#48617]).
This patch introduces a new `WithExtraDialOpts` option which, unlike
`WithDialOpts` are appended to, instead of overriding, previous options.
This allows setting custom options, while maintaining containerd's defaults.
Also unlike `WithDialOpts`, this option can be used multiple times to allow
additional options to be set.
[moby#48617]: https://github.com/moby/moby/pull/48617
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>