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
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