Stephen J Day
ae11d8c64b
cmd/ctr/images: add i
alias for images command
...
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2018-03-12 17:42:41 -07:00
Jess Valarezo
c3cf3d7822
allow content to be pulled for specific platform(s), all platforms
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2018-03-12 17:31:42 -07:00
Stephen Day
3013762fc5
Merge pull request #2203 from Random-Liu/support-in-process-integration
...
Support in process integration
2018-03-12 14:38:27 -07:00
Lantao Liu
1128b3d664
Add service plugin and support in process integration.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-03-12 18:03:50 +00:00
Stephen Day
5368984859
Merge pull request #2160 from ijc/ctr-run-unpack
...
ctr: unpack the image on run if necessary
2018-03-06 19:29:43 -08:00
Derek McGowan
2b6b99b4a1
Merge pull request #2184 from kunalkushwaha/oci-error
...
better image config parse error.
2018-03-05 10:29:02 -08:00
Akihiro Suda
05513284e7
ctr: add UNIX-specific flags to ctr c create
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-03-05 15:26:03 +09:00
Kunal Kushwaha
6ed4e9e106
better image config parse error.
...
compatible oci runtime version printed with parse error
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-03-05 14:04:08 +09:00
Ian Campbell
f48cc7d7fe
ctr: unpack the image on run if necessary
...
Without this `ctr run` can fail with:
ctr: parent snapshot sha256:70798fd80095f40b41baa5d107fb61532bfe494d96313fea01e8fcbf4e8743ee does not exist: not found
My image was produced by buildkit, which doesn't unpack (I think this makes
sense since buildkit doesn't know if I am going to run the image or export/push
it etc).
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2018-02-26 14:23:28 +00:00
Michael Crosby
d3a8055e2d
Add --pid-file to ctr
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-02-20 15:10:50 -05: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
Phil Estes
e4e53bf486
Add --with-ns flag to ctr run/create
...
Adds a useful flag to `ctr` to enable joining any existing Linux
namespaces for any namespace types (network, pid, ipc, etc.) using the
existing With helper in the oci package.
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2018-02-16 15:23:04 -05:00
Michael Crosby
78bd07afef
Merge pull request #1746 from AkihiroSuda/split-differ-interface
...
diff: resplit Applier from Differ
2018-02-05 09:18:56 -05:00
Michael Crosby
5f89502a24
Merge pull request #1790 from jessvalarezo/ctr-c-create
...
ctr: add container create cmd and config flag
2018-01-29 17:19:14 -05:00
Derek McGowan
b763777288
diff: rename differ to comparer
...
Remove combined interface and split implementations.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2018-01-26 16:32:09 -08:00
Phil Estes
d4fb0709c9
Add error return for missing params in ctr images
...
For missing required parameters adds error return before attempting any
actions to `ctr images` commands.
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2018-01-26 09:14:13 -05:00
Jess Valarezo
2c9ce2e693
ctr: add container create, config flag for spec
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2018-01-25 17:16:13 -08:00
Darren Stahl
dcff993653
Update Windows runtime to use snapshotter and differ layers
...
This changes the Windows runtime to use the snapshotter and differ
created layers, and updates the ctr commands to use the snapshotter and differ.
Signed-off-by: Darren Stahl <darst@microsoft.com>
2018-01-23 14:40:24 -08:00
Phil Estes
d7efcbc083
Merge pull request #2036 from stevvooe/use-buffer-pools
...
archive, cio, cmd, linux: use buffer pools
2018-01-23 15:00:41 -05:00
Phil Estes
dc5964ccc2
Merge pull request #2037 from pauldotknopf/master
...
Made a public method to set environment variables and mounts for containers.
2018-01-22 17:05:26 -05:00
Stephen J Day
cd72819b53
archive, cio, cmd, linux: use buffer pools
...
To avoid buffer bloat in long running processes, we try to use buffer
pools where possible. This is meant to address shim memory usage issues,
but may not be the root cause.
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2018-01-22 13:52:06 -08:00
Paul Knopf
b4c3cd7640
Add WithEnv and WithMount oci options
...
Signed-off-by: Paul Knopf <pauldotknopf@gmail.com>
2018-01-22 16:35:31 -05:00
Akihiro Suda
507a149488
cio: add WithFIFODir opt
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-01-18 14:33:56 +09:00
Akihiro Suda
1167035be3
ctr: promote cOpts over opts, as oci.WithImageConfig requires snapshot
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-01-11 14:04:11 +09:00
Daniel Nephin
184bc25629
Add unconvert linter
...
This linter checks for unnecessary type convertions.
Some convertions are whitelisted because their type is different
on 32bit platforms
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2018-01-09 17:36:44 -05:00
Kenfe-Mickael Laventure
0cc79a6ff6
Add no-pivot flag to ctr
...
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2018-01-09 07:48:30 -08:00
Michael Crosby
4e755ad383
Merge pull request #1947 from jessvalarezo/ctr-snapshot-diff
...
ctr: snapshots diff command
2018-01-03 11:34:29 -05:00
Jess Valarezo
625eb5e661
ctr: snapshots diff command
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2018-01-02 21:18:12 -05:00
Michael Crosby
399e3c57c3
Change ctr help for mount from dest to dst
...
dest is not valid, only destination and dst
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-12-15 16:40:25 -05:00
Phil Estes
afbbe43745
Merge pull request #1895 from dnephin/refactor-cio
...
Refactor cio package
2017-12-15 14:44:44 -05:00
Stephen J Day
9aeeefae55
cmd/ctr: stablize output of snapshot tree
...
Preserves the order of the tree output between each execution. Slightly
refactored the behavior to be more "object oriented".
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-12-12 14:50:05 -08:00
Daniel Nephin
7d4337e738
Reduce the number of IO constructors
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-12-11 15:07:09 -05:00
Derek McGowan
40c67fdf78
Merge pull request #1880 from AkihiroSuda/refactor-importer
...
importer: refactor and fix GC
2017-12-04 20:56:26 -08: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
Stephen J Day
1710fe9b95
cmd/ctr: move log messages to debug
...
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-12-01 13:57:54 -08:00
Jess Valarezo
9885edfc44
rename snapshot->snapshots pkg
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-11-29 14:55:02 -08:00
Jess Valarezo
61c8fe2307
ctr: snapshot->snapshots cmd, add aliases
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-11-29 14:34:02 -08:00
Akihiro Suda
7f95b9f987
ctr: add EnvVar CONTAINERD_SNAPSHOTTER
for --snapshotter
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-11-29 19:11:10 +09:00
Phil Estes
2556c594ec
Merge pull request #1767 from stevvooe/ttrpc-shim
...
linux/shim: reduce memory overhead by using ttrpc
2017-11-28 12:43:41 -05:00
Stephen Day
372cdfac3b
Merge pull request #1638 from dmcgowan/gc-policy
...
gc: add policy plugin
2017-11-27 18:20:10 -08:00
Daniel Nephin
cdf62f69a1
Fix usage of oci in other packages.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-11-27 16:16:17 -05:00
Daniel Nephin
0103d14b47
Fix ctr events
...
add import to register event types with grpc
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-11-24 14:28:44 -05:00
Stephen J Day
e8f52c35ce
linux/shim: reduce memory overhead by using ttrpc
...
By replacing grpc with ttrpc, we can reduce total memory runtime
requirements and binary size. With minimal code changes, the shim can
now be controlled by the much lightweight protocol, reducing the total
memory required per container.
When reviewing this change, take particular notice of the generated shim
code.
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-11-22 12:21:48 -08:00
Daniel Nephin
f74862a0dd
Add structcheck, unused, and varcheck linters.
...
Warn on unused and dead code
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-11-21 11:14:37 -05:00
Derek McGowan
3f1a61f76a
Add synchronous image delete
...
Synchronous image delete provides an option image delete to wait
until the next garbage collection deletes after an image is removed
before returning success to the caller.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-11-20 17:08:35 -08:00
Daniel Nephin
298dabc6c2
Move io.go into cio package
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2017-11-17 17:04:45 -05:00
Stephen J Day
c5022ad92d
protobuf: use the gogo/types package for empty
...
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-11-15 19:08:54 -08:00
Stephen Day
571c002ef6
Merge pull request #1755 from AkihiroSuda/fix-ctr-snapshot-args
...
ctr: fix args
2017-11-14 17:55:14 -08:00
Akihiro Suda
5eff92d1ba
ctr: fix args
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-11-15 01:34:12 +00:00
Stephen Day
f9933e9f96
Merge pull request #1742 from jessvalarezo/ctr-task-kill
...
ctr: update task kill to take exec-id
2017-11-13 13:53:26 -08:00
Michael Crosby
92ca22c997
Merge pull request #1735 from estesp/image-rm-feedback
...
Fix output on ctr images rm to show actual feedback
2017-11-13 14:18:12 -05:00
Jess Valarezo
1966f9f1b7
ctr: update task kill to take exec-id
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-11-13 10:47:15 -08:00
Phil Estes
08760757ed
Fix output on ctr images rm to show actual feedback
...
Currently the output for a non-existent image reference and a valid
image reference is exactly the same on `ctr images remove`. Instead of
outputting the target ref input, if it is "not found" we should alert
the user in case of a mispelling, but continue not to make it a failure
for the command (given it supports multiple ref entries)
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-11-10 15:21:27 -05:00
Jess Valarezo
807f4d2ec7
expose exec-id on ctr task ps
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-11-10 11:38:51 -08:00
Victor Vieux
f8a536ed6a
Add S to PLATFORM in images & plugins list
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-11-08 10:43:12 -08:00
Sebastiaan van Stijn
65d5b8b937
Align version output and minor code cleanup
...
This patch changes the output of `ctr version` to align version and revision.
It also changes `.Printf()` to `.Println()`, to make the code slightly easier
to read.
Before this change:
$ ctr version
Client:
Version: v1.0.0-beta.2-132-g564600e.m
Revision: 564600ee79aefb0f24cbcecc90d4388bd0ea59de.m
Server:
Version: v1.0.0-beta.2-132-g564600e.m
Revision: 564600ee79aefb0f24cbcecc90d4388bd0ea59de.m
With this patch applied:
$ ctr version
Client:
Version: v1.0.0-beta.2-132-g564600e.m
Revision: 564600ee79aefb0f24cbcecc90d4388bd0ea59de.m
Server:
Version: v1.0.0-beta.2-132-g564600e.m
Revision: 564600ee79aefb0f24cbcecc90d4388bd0ea59de.m
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-03 17:49:23 +01:00
Stephen J Day
0a1a13448b
defaults: add package to contain server defaults
...
To reduce the binary size of containerd, we no longer import the
`server` package for only a few defaults. This reduces the size of `ctr`
by 2MB. There are probably other gains elsewhere.
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-11-02 13:59:34 -07:00
Jess Valarezo
864b16a2cb
ctr: alphabetize commands, rename signals
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-31 11:57:49 -07:00
Jess Valarezo
f654b7b71e
ctr: move pprof to commands package
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-31 11:57:49 -07:00
Jess Valarezo
a827a17f1d
ctr: move shim to commands
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-31 11:57:49 -07:00
Jess Valarezo
c3b70f1d0b
ctr: move tasks, run to commands package
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-31 11:57:41 -07:00
Phil Estes
ff904841f9
Merge pull request #1668 from jessvalarezo/image-unpack-check
...
client: Add helper function which checks if an image is unpacked
2017-10-31 10:23:08 -04:00
Jess Valarezo
1552ee23da
client: Add helper function which checks if an image is unpacked
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-30 16:33:54 -07:00
Jess Valarezo
e4da49c44c
ctr: move unpack to snapshot command
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-30 13:23:36 -07:00
Jess Valarezo
456d3f4475
ctr: move push and pull to images command
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-30 13:23:36 -07:00
Jess Valarezo
b58e4fc2ed
ctr: move fetch,fetch-object,push-object to content
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-30 13:23:06 -07:00
Jess Valarezo
16855eedf7
ctr: move resolver to commands package
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-26 16:31:58 -04:00
Jess Valarezo
ffd0d2ef58
ctr: move signals to commands package
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-26 16:31:23 -04:00
Jess Valarezo
8540587b37
ctr: move events command
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-25 22:21:57 -04:00
Jess Valarezo
fdb6859921
ctr: move namespaces command
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-25 22:00:14 -04:00
Jess Valarezo
750fd89b38
ctr: move snapshot command
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-25 21:23:41 -04:00
Jess Valarezo
0895dbe932
ctr: move content command
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-25 21:16:44 -04: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
Jess Valarezo
47fae4dd17
ctr: move containers command
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-25 21:07:54 -04:00
Michael Crosby
ae995bc7b3
Move plugins command
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-25 11:22:59 -04:00
Michael Crosby
2dac1b6963
Move version command into package
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-25 11:14:09 -04:00
Michael Crosby
4743f1fc4c
Move NewClient and AppContext to commands pkg
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-25 11:10:00 -04:00
Jess Valarezo
a19a20303a
ctr: add commands package with shared utility functions
...
Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
2017-10-23 17:40:18 -07:00