Sebastiaan van Stijn
f7089ba225
leases: add WithLabel
...
This adds a new WithLabel function, which allows to set a single label on
a lease, without having to first construct an intermediate map[string]string.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-11 21:03:40 +02:00
panguicai008
5c9c630c33
use uppercase letters for flag usage
...
Signed-off-by: panguicai008 <guicai.pan@daocloud.io>
2023-03-08 14:28:06 +08:00
yulng
757b8f702b
keep the uppercase letter for flag info
...
Signed-off-by: yulng <wei.yang@daocloud.io>
2023-02-06 16:37:24 +08:00
yanggang
3abcfb5c07
keep the lower case letter for flag info
...
Signed-off-by: yanggang <gang.yang@daocloud.io>
2022-11-15 14:09:55 +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
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
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