containerd/remotes/docker
Wei Fu 506b815483 remotes: add distribution labels to blob data
We can use cross repository push feature to reuse the existing blobs in
the same registry. Before make push fast, we know where the blob comes
from.

Use the `containerd.io/distribution.source. = [,]` as label format. For
example, the blob is downloaded by the docker.io/library/busybox:latest
and the label will be

    containerd.io/distribution.source.docker.io = library/busybox

If the blob is shared by different repos in the same registry, the repo
name will be appended, like:

    containerd.io/distribution.source.docker.io = library/busybox,x/y

NOTE:
1. no need to apply for legacy docker image schema1.
2. the concurrent fetch actions might miss some repo names in label, but
it is ok.
3. it is optional. no need to add label if the engine only uses images
not push.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2019-03-12 13:42:54 +08:00
..
schema1 Update empty layer label 2018-10-15 11:28:45 -07:00
auth.go fix: linter issue 2019-01-23 22:54:51 +08:00
authorizer.go Explicitly stating utf-8 when fetching oauth token 2018-12-12 12:16:27 +08:00
converter.go bugfix: support application/octet-stream during pull 2018-12-29 13:58:36 +08:00
fetcher_test.go Fix invalid length bug with some registries 2018-05-26 23:41:56 -07:00
fetcher.go Fix typos 2018-09-07 16:59:42 +08:00
handler_test.go remotes: add distribution labels to blob data 2019-03-12 13:42:54 +08:00
handler.go remotes: add distribution labels to blob data 2019-03-12 13:42:54 +08:00
httpreadseeker.go Fix typos 2018-09-07 16:59:42 +08:00
pusher.go docker/pusher: handle location string containing path and query 2018-06-05 19:25:19 +00:00
resolver_test.go Update resolver code 2018-09-28 14:32:23 -07:00
resolver.go Merge pull request #2751 from Charliekenney23/add-useragent-resolver-option 2018-11-20 10:51:10 -08:00
scope_test.go Update tests to use gotest.tools angel 2018-06-08 21:02:01 +02:00
scope.go Licence header added 2018-02-19 10:32:26 +09:00
status.go Licence header added 2018-02-19 10:32:26 +09:00