Michael Crosby
db687ff485
Add --runtime-root to ctr
...
Signed-off-by: Michael Crosby <michael@thepasture.io>
2020-08-21 04:55:28 -04:00
Michael Crosby
7e84abe99c
Merge pull request #4468 from prashantbhutani90/master
...
Report correct stats for windows containers
2020-08-25 11:37:28 -04:00
Prashant Bhutani
35b63c064f
Report correct stats for windows containers
...
Windows container stats were reporting incorrect metrics for cpu kernel runtime.
Signed-off-by: Prashant Bhutani <prbhutan@microsoft.com>
2020-08-12 00:51:37 +05:30
kenneth.kang
e20a5079e8
Add --cpu-quota, --cpu-period flag to ctr
...
Signed-off-by: Kenneth Kang <kenneth.kang@lge.com>
2020-08-06 10:04:59 +09:00
Michael Crosby
02afa94256
Add --cpus flag to ctr
...
Signed-off-by: Michael Crosby <michael@thepasture.io>
2020-07-28 23:06:07 -04:00
Maksym Pavlenko
97c081c84b
Merge pull request #4410 from TBBle/minor_windows_fixes
...
Minor fixes around Windows network setup
2020-07-21 15:26:18 -07:00
Paul "TBBle" Hampson
06fb93e0f0
Reject host-mode networking on Windows
...
The flag was being silently ignored, and so no network setup was done,
and no notice given.
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2020-07-21 19:43:08 +10:00
Sherif
96099550b5
parseIDMapping: accept 32-bit IDs
...
Signed-off-by: Sherif Mowafy <sherif.mowafy@gmail.com>
2020-07-19 10:09:51 +02:00
Phil Estes
45c28f56b2
Add ability to use remapper labels versus remapping snapshot helper
...
A simple starting point for testing the remapper labels with
fuse-overlayfs snapshotter
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2020-06-29 10:21:55 -04:00
Wei Fu
4b5d7f66c9
Merge pull request #4290 from mxpv/ctr-oci
...
Add ctr subcommand to print default OCI spec
2020-05-29 10:45:36 +08:00
Maksym Pavlenko
636c533d95
Add ctr subcommand to print default OCI spec
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2020-05-28 14:06:44 -07:00
John Millikin
b8ccdcb07d
Add ctr
flags for configuring default TLS credentials.
...
Signed-off-by: John Millikin <jmillikin@stripe.com>
2020-05-27 21:59:33 +09: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
Derek McGowan
547301cb0c
Update ctr resolver to use new config package
...
Moved registry host configuration to the config package
and allows support of loading configurations from a
directory when the hosts are being resolved.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2020-03-31 22:52:10 -07:00
Akihiro Suda
dc131aa862
support loading certs from a directory
...
Add `remotes/certutil` functions for loading `ca.crt`, `client.cert`, and `client.key` into `tls.Config` from a directory like `/etc/docker/certs.d/<hostname>.
See https://docs.docker.com/engine/security/certificates/ .
Client applications including CRI plugin are expected to configure the resolver using these functions.
As an example, the `ctr` tool is extended to support `ctr images pull --certs-dir=/etc/docker/certs.d example.com/foo/bar:baz`.
Tested with Harbor 1.8.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-31 21:48:08 -07:00
Peng Tao
ebd745f91a
ctr: do not assume runc options by default
...
If runtime is not runc, it doesn't make sense to send runc Options
as container create options, which will confuse other runtimes and
it actually causes kata shimv2 to fail to unmarshal the requset.
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-03-24 18:45:34 +08:00
Michael Crosby
00e6be9f45
Add ctr c info --spec flag to output spec
...
This flag makes it easy to view only the OCI spec for the container.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2020-03-05 12:10:14 -05:00
Akihiro Suda
833701165a
ctr events: do not exit on an error
...
Errors like `"type with url %s: not found"` are typical for non-builtin
event types, and should not resultin exiting `ctr`.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-01-29 13:10:16 +09:00
Akihiro Suda
b127b666aa
ctr: support $CONTAINERD_ADDRESS env var
...
`$CONTAINERD_ADDRESS` can be specified instead of the `ctr --address` flag.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-01-07 15:59:12 +09:00
Wei Fu
5fc0f30167
Merge pull request #3903 from katiewasnothere/local_introspection
...
create local version of introspection service
2020-01-03 15:36:31 +08:00
Kathryn Baldauf
a18f77bea0
create local version of introspection service
...
Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
2020-01-02 12:34:23 -08: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
Boris Popovschi
49e7039a85
cpu metrics consistency
...
Signed-off-by: Boris Popovschi <zyqsempai@mail.ru>
2019-12-17 12:30:12 +02:00
Boris Popovschi
659c971cad
task metrics fix
...
Signed-off-by: Boris Popovschi <zyqsempai@mail.ru>
2019-12-17 10:52:37 +02:00
bpopovschi
b98cc79184
Added memory and cpu metrics for cgroupv2
...
Signed-off-by: bpopovschi <zyqsempai@mail.ru>
2019-12-16 16:10:51 +02:00
Phil Estes
fa62b6d238
Use logrus instead of printf for warning
...
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2019-12-12 19:33:04 -05:00
Michael Crosby
5d93ece758
Merge pull request #3799 from AkihiroSuda/cgroup2
...
support cgroup2
2019-12-12 14:30:19 -05:00
Michael Crosby
1649e8e43b
Merge pull request #3848 from liaojh1998/master
...
support user remapping in ctr
2019-12-12 14:20:07 -05:00
Joakim Roubert
e0011978ff
start.go: Improve help text
...
Change-Id: I9adfc27868b246fb85823d18c65f95668e3fbc58
Signed-off-by: Joakim Roubert <joakimr@axis.com>
2019-12-12 11:19:41 +01:00
Jie Hao Liao
9862cb8f85
support user remapping in ctr
...
* --uidmap support for one remapping
* --gidmap support for one remapping
* create IoUid and IoGid options for getNewTaskOpts
Signed-off-by: Jie Hao Liao <liaojh1998@gmail.com>
2019-12-12 01:16:47 -06:00
Akihiro Suda
8f870c233f
support cgroup2
...
* only shim v2 runc v2 ("io.containerd.runc.v2") is supported
* only PID metrics is implemented. Others should be implemented in separate PRs.
* lots of code duplication in v1 metrics and v2 metrics. Dedupe should be separate PR.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-12-12 02:56:51 +09:00
Jie Hao Liao
787be0efe2
Modify ctr run to search for read-only flag instead of readonly
...
Signed-off-by: Jie Hao Liao <liaojh1998@gmail.com>
2019-12-04 02:18:23 -06:00
Akihiro Suda
8f74de9e9e
ctr: allow specifying --runc-systemd-cgroup
...
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-11-08 14:06:08 +09:00
Akihiro Suda
7f5d900769
ctr: allow specifying --runc-binary
...
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-11-08 14:06:08 +09:00
Justin Terry (VM)
37b56cafc6
Add ctr metrics support for Windows/LCOW containers
...
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
2019-10-23 13:50:34 -07:00
Michael Crosby
a6d3f4d30b
Add device opts to ctr --privileged
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-10-10 14:23:59 -04:00
fahed dorgaa
c0984941e3
adding go version to client description
...
Signed-off-by: fahed dorgaa <fahed.dorgaa@gmail.com>
gofmt version.go
Signed-off-by: fahed dorgaa <fahed.dorgaa@gmail.com>
add a Godoc
Signed-off-by: fahed dorgaa <fahed.dorgaa@gmail.com>
go fmt version.go
Signed-off-by: fahed dorgaa <fahed.dorgaa@gmail.com>
add sapces to comment
Signed-off-by: fahed dorgaa <fahed.dorgaa@gmail.com>
2019-10-06 13:38:51 +02:00
Phil Estes
309c9c25ba
Merge pull request #3706 from mrueg/enable-autocmpl
...
ctr: Enable shell autocompletion
2019-10-03 09:15:51 -04:00
Michael Crosby
8ff5827e98
Update cri and cgroup packages
...
This change includes a cri master bump and a cgroup bump for windows support
with cgroup stats and reusing the cgroup metric types.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-10-01 10:19:56 -04:00
Manuel Rüger
b5fa55b0c2
ctr: Enable shell autocompletion
...
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2019-10-01 09:43:21 +02:00
Lajos Papp
19ecd49ed0
implement ctr -connect-timeout
...
Signed-off-by: Lajos Papp <lalyos@yahoo.com>
2019-09-16 13:56:53 +02:00
Michael Crosby
5a656cacb4
Move manpage gen to separate binary
...
This moves the man page generation to a separate binary
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-09-12 14:19:00 -04:00
Michael Crosby
f3a5b8c0a9
Add command to generate man pages
...
The climan package has a command that can be registered with any urfav
cli app to generate man pages.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-09-11 15:31:02 -04:00
Michael Crosby
51671ef734
Merge pull request #3630 from AkihiroSuda/ctr-newdockerauthorized
...
ctr: use NewDockerAuthorizer instead of deprecated NewAuthorizer
2019-09-09 12:47:10 -04:00
Akihiro Suda
c1fc21e92e
ctr: use NewDockerAuthorizer instead of deprecated NewAuthorizer
...
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-09-09 02:38:07 +09:00
Michael Crosby
fa11147e5f
Add --env-file to ctr
...
Closes #3517
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-09-06 16:25:02 -04:00
Derek McGowan
b039c39186
Merge pull request #3564 from tiborvass/move-cgroups-dep-to-namespaces-pkg
...
runtime/opts: move WithNamespaceCgroupDeletion from containerd to its own package
2019-09-03 10:38:53 -07:00
Michael Crosby
779701b29c
Add --seccomp flag to ctr
...
This enables testing of containers with the default seccomp profile
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-08-29 13:02:21 -04:00
Tibor Vass
6624a70d92
runtime/opts: move WithNamespaceCgroupDeletion from containerd to its own package
...
The cgroup dependency brings in quite a lot only for WithNamespaceCgroupDeletion,
which is a namespaces.DeleteOpt.
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-08-27 19:02:55 +00:00