Commit Graph

16 Commits

Author SHA1 Message Date
James Jenkins
9d18b57469 Modify WithDiscardUnpackedLayers
Modify the WithDiscardUnpackedLayers function such that it does not
require any parameters.

Signed-off-by: James Jenkins <James.Jenkins@ibm.com>
2022-09-29 10:24:45 -04:00
James Jenkins
2432b54a56 Add new ctr option for discarding unpacked layers
Add a new ctr cli option, allowing the garbage collector to discard any
unpacked layers after importing an image. This new option is
incompatible with the no-unpack ctr import option.

Signed-off-by: James Jenkins <James.Jenkins@ibm.com>
2022-09-23 15:30:33 -04:00
Gavin Inglis
2c98a7b099 ctr import: strictly match platform
Currently, ctr import will use loose matching as defined by
platforms.Only(), meaning in the case of platform linux/amd64 as in
issue#6441, importing will also match linux/386 platform on the
image-to-be-imported's index. However, that image-to-be-imported may not
have both the linux/amd64 and linux/386 platform contents, resulting in
a failure to unpack the image. This change makes that check strict such
that the requested platform to import for is the only platform content
imported. Both ctr pull and ctr export will treat the platform option as
strict, so this change makes ctr import consistent with those.

resolves #6441

Signed-off-by: Gavin Inglis <giinglis@amazon.com>
2022-05-06 22:44:43 +00:00
jonyhy
933ddaa6f8 fix: wrong flag type
Signed-off-by: jonyhy <yun.hao@daocloud.io>
2021-09-29 16:22:51 +08:00
jonyhy
da16d492cd feat: support import image for specific platform
Signed-off-by: jonyhy <yun.hao@daocloud.io>
2021-09-29 14:00:17 +08:00
Kohei Tokunaga
6875aa5d37 import: Add option to skip creating digest image
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-09-15 20:20:57 +09:00
Derek McGowan
02826345cf
Add option to compress blobs on import
Change the default back to leave uncompressed and add
option to do the compression.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-07-25 12:05:38 -07:00
Benjamin Elder
cb7c780af2 ctr images import: add --no-unpack option
Signed-off-by: Benjamin Elder <bentheelder@google.com>
2019-05-01 17:09:30 -07:00
Aldo Culquicondor
9a8727cf09 Allow to import an image for the default platform only.
Add `all-platforms` option to `ctr images import`.

Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-03-19 11:25:57 -04:00
Derek McGowan
a62be324b7
Unify docker and oci importer
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2018-09-17 14:41:43 -07:00
Derek McGowan
bce20b75da
Simplify docker importer
Support any layout and rely on manifest.json to reference blobs

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2018-09-14 14:21:27 -07:00
Derek McGowan
9e6db71954
Add docker importer
Update ctr to support all formats by default

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2018-09-14 14:21:26 -07:00
Derek McGowan
f57c5cdefb
Refactor image importer
Allow customization of reference creation.
Add option for digest references.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2018-09-14 14:21:26 -07:00
Kunal Kushwaha
b12c3215a0 Licence header added
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-02-19 10:32:26 +09:00
Akihiro Suda
63401970c7 importer: refactor
- Use lease API (previoisly, GC was not supported)
- Refactored interfaces for ease of future Docker v1 importer support

For usage, please refer to `ctr images import --help`.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-12-05 12:48:32 +09:00
Jess Valarezo
f980cc197e ctr: move images command
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-25 21:08:00 -04:00