guiyong.ou
628f6ac681
code cleanup
...
Signed-off-by: guiyong.ou <guiyong.ou@daocloud.io>
2022-07-19 22:46:32 +08:00
cosmoer
df93940fb2
fix: ctr images mount with snapshotter option can't get snapshotter
...
Signed-off-by: Qian Zhang <cosmoer@qq.com>
2022-03-23 23:12:54 +08:00
Derek McGowan
62f6c8175a
Merge pull request #6424 from cpuguy83/nondist-blob-push
...
Add support for skipping non-dist blob push
2022-01-19 19:12:31 -08:00
ning.a.li
a303d552ad
ctr: Unify the delete subcommand alias
...
This commit unifies the following sub commands alias for
deleting/removing.
- containers
- tasks
- contents
- leases
- images
- snapshots
Signed-off-by: Ning Li <lining2020x@163.com>
2022-01-11 16:21:26 +08:00
Brian Goff
d05194f0a7
ctr: flag to toggle non-distributable blob push
...
With this flag, ctr will no longer automatically push non-distributable
artifacts by default.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-01-11 00:49:40 +00: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
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
Mike Brown
391b123a5e
adds quiet option for ref
...
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-04-20 09:20:14 -05:00
Mike Brown
00f8d32ef5
add not found debug out for check cmd; update usage
...
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-04-19 19:36:10 -05:00
Wei Fu
f8c2f04756
remotes/ctr: allow to limit max concurrent uploads like downloads
...
Also add flags for push/pull subcommand to limit max concurrent
uploads/downloads.
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2021-03-25 14:37:02 +08:00
Maksym Pavlenko
22ef69d77d
Support HTTP debug in ctr
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-03-22 09:32:34 -07:00
Iceber Gu
231bbdc379
cmd/ctr: fix export command
...
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2021-03-15 13:22:56 +08:00
Alakesh Haloi
9f5244f410
Print elapsed time for image unpack
...
The provides additional insight into how much time is being spent in
unpacking and is helpful in performance comparison for just this stage
without resorting to running under time command in linux for example.
Signed-off-by: Alakesh Haloi <alakeshh@amazon.com>
2021-03-09 06:40:49 +00:00
Phil Estes
51992133af
Allow HTTP tracing in push/pull via --trace flag
...
Signed-off-by: Phil Estes <estesp@amazon.com>
2021-03-02 20:33:35 -05:00
Akihiro Suda
5ca3ac65c4
add Image content converter
...
Go example:
```go
opts := []converter.Opt{
// convert Docker media types to OCI ones
converter.WithDocker2OCI(true),
// convert tar.gz layers to uncompressed tar layers
converter.WithLayerConvertFunc(uncompress.LayerConvertFunc),
}
srcRef := "example.com/foo:orig"
dstRef := "example.com/foo:converted"
dstImg, err = converter.Convert(ctx, client, dstRef, srcRef, opts...)
fmt.Println(dstImg.Target)
```
ctr example: `ctr images convert --oci --uncompress example.com/foo:orig example.com/foo:converted`
Go test: `go test -exec sudo -test.root -test.run TestConvert`
The implementation is from https://github.com/containerd/stargz-snapshotter/pull/224 ,
but eStargz-specific functions are not included in this PR.
eStargz converter can be specified by importing `estargz` package and using `WithLayerConvertFunc(estargz.LayerConvertFunc)` option.
This converter interface will be potentially useful for converting zstd and ocicrypt layers as well.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-01-22 13:33:19 +09:00
Derek McGowan
392b2857aa
Merge pull request #4848 from katiewasnothere/ctr_image_chainid
...
Add a new flag to ctr "images pull" to print the image's chainID
2021-01-21 17:11:53 -08:00
Kathryn Baldauf
14df541a40
Add a new flag to images pull for printing out the pulled image's chainID
...
Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
2021-01-12 15:42:40 -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
Li Ning
97cee75da8
ctr: fix the incorrect image unmount error hint
...
Signed-off-by: Li Ning <lining@cmss.chinamobile.com>
2020-11-11 19:57:31 +08:00
Brian Goff
1a10211e3f
WithLease: always return context and done fn
...
We should never return a nil context because of the way this function is
typically used... e.g.
```
ctx, done, err := containerd.WithLease(ctx)
```
If there is an error `ctx` will be nil and any error handling may cause
an NPE if it tries to use `ctx`.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-04-25 21:16:43 -07:00
Brian Goff
98b30f4690
Add commands to mount/unmount image from ref
...
Example:
```terminal
$ mkdir /opt/busybox
$ ctr image mount docker.io/library/busybox:latest /opt/busybox
/opt/busybox
$ ls -lh /opt/busybox
total 40K
drwxr-xr-x 2 root root 12K Apr 14 01:10 bin
drwxr-xr-x 2 root root 4.0K Apr 14 01:10 dev
drwxr-xr-x 3 root root 4.0K Apr 14 01:10 etc
drwxr-xr-x 2 nobody nogroup 4.0K Apr 14 01:10 home
drwx------ 2 root root 4.0K Apr 14 01:10 root
drwxrwxrwt 2 root root 4.0K Apr 14 01:10 tmp
drwxr-xr-x 3 root root 4.0K Apr 14 01:10 usr
drwxr-xr-x 4 root root 4.0K Apr 14 01:10 var
$ ctr image unmount /opt/busybox
$ ls -lh /opt/busybox
total 0
```
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-04-25 21:00:21 -07:00
Xiaodong Ye
072dfbaf36
Support pushing a specific platform of a multi-architecture docker image to a registry
...
Signed-off-by: Xiaodong Ye <xiaodongy@vmware.com>
2019-12-23 17:24:45 +08:00
Derek McGowan
a40c3830df
Add option to pull all metadata
...
Add flags to pull and fetch to grab all metadata.
Add fetch option to pull only metadata.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-08-26 11:05:21 -07:00
Yu Yi
aae2d0d754
delete unnecessary checks and fix a test
...
Signed-off-by: Yu Yi <yiyu@google.com>
2019-08-23 14:02:56 -07:00
Yu Yi
9e183f5e52
add cli option to download all manifests
...
- Add `all-manifests` option to both `ctr content fetch` and `ctr
images pull`. By default it is false.
- This option ties to `AppendDistributionSourceLabel` in client.
Signed-off-by: Yu Yi <yiyu@google.com>
2019-08-23 14:02:56 -07:00
Michael Crosby
d085d9b464
Remove encryption code from containerd core
...
We are separating out the encryption code and have designed a few new
interfaces and APIs for processing content streams. This keep the core
clean of encryption code but enables not only encryption but support of
multiple content types ( custom media types ).
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-08-09 15:01:16 +00:00
Brandon Lum
8cd480c233
Specify protocols in ctr encrypt recipients
...
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2019-07-26 13:20:22 -04:00
Phil Estes
29930e9185
Merge pull request #3455 from dmcgowan/fix-default-import-compression
...
Add option to compress blobs on import
2019-07-25 16:45:11 -04: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
Brandon Lum
3d1fa69694
Implemented constructors for both encryption and decryption
...
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2019-07-24 22:19:39 -04:00
Stefan Berger
364de4c35d
Wrap creation of CryptoConfig in constructors
...
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2019-07-23 19:53:23 -04:00
Brandon Lum
c6d437fd70
Corrected lease implementation
...
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2019-07-18 18:17:20 -04:00
Derek McGowan
dde436e65b
Crypto library movement and changes to content helper interfaces
...
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2019-07-17 15:21:29 -04:00
Stefan Berger
bf8804c743
Implemented image encryption/decryption libraries and ctr commands
...
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2019-07-17 15:19:58 -04:00
Eli Uriegas
af93e4009b
ctr: Add images tag subcommand
...
Adds a subcommand for tagging images managed by containerd.
Usage:
ctr images tag docker.io/library/alpine:latest docker.io/library/alpine:new
Comes with a --force flag to allow you to gracefully overwrite image references
that already exist.
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2019-07-06 15:44:17 +00:00
Wei Fu
e61f7f4913
Merge pull request #3172 from dmcgowan/export-docker-compatibility
...
Update image export to support Docker format
2019-05-17 14:30:54 +08: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
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
Phil Estes
9ab4c8cbcc
Merge pull request #3108 from alculquicondor/fix/import
...
Allow to import an image for the default platform only.
2019-03-19 13:29:57 -04: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
Phil Estes
b90eeadafa
Merge pull request #3102 from Ace-Tang/arg_usage
...
ctr: fix image cmd ArgsUsage
2019-03-18 08:37:18 -07:00
Ace-Tang
14a050688d
ctr: fix image cmd ArgsUsage
...
ctr image list/check 's ArgsUsage should be filter, not ref
Signed-off-by: Ace-Tang <aceapril@126.com>
2019-03-18 21:11:34 +08:00
Wei Fu
6424a36032
ctr/commands/images/push: don't show progress if it is debug mode
...
If user sets debug mode, the command push should only show the debug log
information. If the stdout is with flush by the progress status, it is
hard to see the debug log.
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2019-03-05 22:21:55 +08:00
kadisi
40267382c5
fix ctr image export not found error
...
Signed-off-by: Jie Zhang <iamkadisi@163.com>
2018-12-17 08:52:28 +08: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