Commit Graph

12 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
d3f5e0c90e
images/archive: replace hardcoded strings for OCI-spec consts
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-17 17:53:21 +02:00
Bjorn Neergaard
377c5ca9cd
images/archive: use mediatype helpers
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-27 09:29:56 -06:00
Jin Dong
7601dd9a9e Dedup manifest config platform helper
It also removes a duplicated digest validate call

Signed-off-by: Jin Dong <djdongjin95@gmail.com>
2023-06-22 01:36:58 +00:00
Justin Chadwell
4065831652 archive: consistently respect value of WithSkipDockerManifest
It was possible to still export the docker-compatible manifest.json
file, if a single platform image (as a standalone manifest) was
exported, even if the WithSkipDockerManifest option was explicitly set.

To resolve this, we remove all references to skipDockerManifest to,
adding it instead to the point-of-writing, simplifying the earlier logic
and making it clear exactly when this manifest file should be written.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-03-06 16:27:13 +00:00
Derek McGowan
13bf5565eb
[transfer] update export to use image store references
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-03-02 11:14:32 -08:00
Samuel Karp
f9c9121e53
archive: validate digests before use
digest.Algorithm() and digest.Encoded() may panic for invalid digests.
Validate prior to calling those methods.

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2022-10-06 19:37:31 -07:00
haoyun
bbe46b8c43 feat: replace github.com/pkg/errors to errors
Signed-off-by: haoyun <yun.hao@daocloud.io>
Co-authored-by: zounengren <zouyee1989@gmail.com>
2022-01-07 10:27:03 +08:00
Akihiro Suda
e2e2c5737d
export: add --skip-non-distributable
The flag skips adding non-distributable blobs such as Windows layers to archive.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-01-01 06:32:01 +09:00
yuxiaobo
0cb7e4d5fd Perfect documentations
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-09-30 09:29:04 +08:00
Derek McGowan
3e52e29025
Fix bug in export named manifest option
When providing multiple names, the shared annotation map was
causing the names to get overridden.
Combined the WithManifest options which had compatible interfaces.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-08-01 15:34:07 -07:00
Derek McGowan
5e2d7efd82
Use a single custom annotation for export
Remove annotation prefix and add multiple index records
for manifests with multiple image names. This makes the
custom annotation more consistent with the OCI image
annotation. Additionally, ensure the OCI image annotation
always represents the tag (partial image name) as recommended
by the specification. The containerd image name annotation
will always contain the full image name.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-05-21 17:21:26 -07:00
Derek McGowan
4754d2aeee
Update image export to support Docker format
Add manifest.json file which is used by Docker
to import images.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-04-04 15:23:06 -07:00