1
0
mirror of https://github.com/docker/cli.git synced 2026-01-19 21:41:31 +03:00
Commit Graph

135 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
3deff1380d Merge pull request #26579 from Microsoft/jjh/ociprocess
Windows: OCI `process` struct and console size to uint
Upstream-commit: 889980d6e3
Component: cli
2016-09-19 22:52:16 +02:00
John Howard
1652332026 Windows: OCI process struct convergence
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f14f7711e7
Component: cli
2016-09-19 10:34:31 -07:00
Daniel Nephin
a765266b0a Only hide commands if the env variable is set.
Better formatting for usage template.
Group commands in usage to management/operation commands.
Remove the word Docker from the description of management commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 1f0f7ecb5a
Component: cli
2016-09-19 13:28:15 -04:00
Daniel Nephin
93bceb1528 Move the search command to the registry package.
And move it back to the top-level command.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 68b7f55a45
Component: cli
2016-09-19 13:28:15 -04:00
Daniel Nephin
5ae46f25cb Move canonical image and container commands into a command group
Hide some top level commands
Add docker container and image inspect commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: accc5d5bd4
Component: cli
2016-09-19 13:28:02 -04:00
Sebastiaan van Stijn
2eba4524b4 Merge pull request #26268 from AkihiroSuda/eventsjsonl
add `docker events --format`
Upstream-commit: a151a36595
Component: cli
2016-09-19 17:30:27 +02:00
John Howard
b2e202046b Merge pull request #25737 from Microsoft/jjh-statistics
Windows: Add support for docker stats
Upstream-commit: 41b980ad6d
Component: cli
2016-09-17 09:31:24 -07:00
Sebastiaan van Stijn
21a5ca1831 Merge pull request #26387 from Microsoft/jjh/securityopts
Only output security options if there are any
Upstream-commit: 3fc784d460
Component: cli
2016-09-16 23:05:30 +02:00
John Howard
25db3b26a7 Windows: stats support
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c323878331
Component: cli
2016-09-16 11:56:15 -07:00
John Howard
0e8c716b08 Only output security options if there are any
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d0e960f3b1
Component: cli
2016-09-16 10:05:21 -07:00
Akihiro Suda
85c46768d0 add docker events --format
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 0ae2a02ce6
Component: cli
2016-09-15 09:55:29 +00:00
Daniel Nephin
a43858a79d Fix testcases that expect trailing whitespace
and broken integration tests based of nil pointers

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 2f8c4333fe
Component: cli
2016-09-13 17:58:12 -04:00
Daniel Nephin
91cf73d819 Refactor formatter.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: db0952ad22
Component: cli
2016-09-13 17:58:12 -04:00
Daniel Nephin
d9c3f096cf Use opts.FilterOpt for filter flags.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d9cb421d69
Component: cli
2016-09-13 16:20:10 -04:00
Daniel Nephin
5a7dfca796 Merge pull request #24761 from WeiZhang555/parallel-stop
Enhancement: allow parallel stop, pause, unpause
Upstream-commit: 62f513507e
Component: cli
2016-09-13 10:46:51 -04:00
Yong Tang
7fb726de4d Fix issue of WARNING: --size ignored for volume for docker inspect
When `docker inspect` is invoked, it is possible to pass a flag of
`-s` for container types to display size information. If `-s` is used
for non-container types then a warning `WARNING: --size ignored for volume`
will show up.

However, currently `WARNING: --size ignored for volume` will show up even
when `-s` is not passed to `docker inspect` for non-container types.

This fix fixes this issue by checking if `-s` has been passed or not (`getSize`).
Also, since image inspect does not support `-s`, `IsSizeSupported` has been changed
to false for images.

This fix is tested manually.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9aba07679f
Component: cli
2016-09-12 23:08:19 -07:00
Zhang Wei
24c19a8d47 Add parallel operation support for pause/unpause
Support parallel pause/unpause

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 4570bfe8de
Component: cli
2016-09-13 11:01:28 +08:00
Zhang Wei
45c490c19f Enhancement: allow parallel stop
Stop multiple containers in parallel to speed up stop process, allow
maximum 50 parallel stops.

Signed-off-by: Abhinav Dahiya <abhinavdtu2012@gmail.com>
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 285fef282f
Component: cli
2016-09-13 10:50:55 +08:00
Brian Goff
ee44344b08 Merge pull request #26103 from sakeven/fix-validate-build-arg
validate build-arg
Upstream-commit: d23d33781a
Component: cli
2016-09-12 09:15:58 -04:00
Antonio Murdaca
c4973b1822 Merge pull request #26456 from dnephin/move_cli_command_registry
Remove registry/auth helper methods from the DockerCLI object
Upstream-commit: aabe9468aa
Component: cli
2016-09-12 15:11:04 +02:00
sakeven
4f7aafa408 validate build-arg
Signed-off-by: sakeven <jc5930@sina.cn>
Upstream-commit: f39b39cccb
Component: cli
2016-09-12 18:02:21 +08:00
Vincent Demeester
8f50e93ae4 Merge pull request #26303 from yongtang/26300-docker-images-3-fractional-digits
Restrict size to 2 fractional digits for `docker images`
Upstream-commit: 2dc3e0341b
Component: cli
2016-09-10 11:32:45 +02:00
Daniel Nephin
3c8785422e Remove remaining registry methods from DockerCLI.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a26ba0e702
Component: cli
2016-09-09 15:50:01 -04:00
Daniel Nephin
5a9c815672 Remove cli/command/credentials
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4ae4e66e3c
Component: cli
2016-09-09 15:50:01 -04:00
Daniel Nephin
b9ca23a598 Remove RetrieveAuthConfigs
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ed55f00674
Component: cli
2016-09-09 15:50:01 -04:00
Phil Estes
e71d793ff1 Merge pull request #22049 from boucher/docker-checkpoint-restore
Implement containerd API for checkpoints
Upstream-commit: 5fe882a494
Component: cli
2016-09-09 13:36:55 -04:00
boucher
e0e6966e2d Update checkpoint comments to be more accurate
Signed-off-by: boucher <rboucher@gmail.com>
Upstream-commit: 272868566b
Component: cli
2016-09-09 12:13:46 -04:00
Daniel Nephin
bea6567477 Move image trust related cli methods into the image package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0cf85349f3
Component: cli
2016-09-09 10:50:16 -04:00
boucher
46699a2a41 Fix typo
Signed-off-by: boucher <rboucher@gmail.com>
Upstream-commit: 9524caa317
Component: cli
2016-09-08 21:31:56 -04:00
boucher
cef9a66721 Initial implementation of containerd Checkpoint API.
Signed-off-by: boucher <rboucher@gmail.com>
Upstream-commit: f0647193dc
Component: cli
2016-09-08 21:31:52 -04:00
Yong Tang
9c57f9b583 Restrict size to 2 fractional digits for docker images
This fix tries to address the issue raised in 26300. Previously
`docker images` will use `HumanSize()` to display the size which
has a fixed precision of 4 (thus 3 fractional digits). This
could be problematic in certain languages (e.g. , German, see
26300) as `.` may be interpreted as thousands-separator in number.

This fix use `CustomSize()` instead and limit the precision to 3
(thus 2 fractional digits).

This fix has been tested manually.

This fix fixes 26300.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c68bb57959
Component: cli
2016-09-08 18:26:50 -07:00
Daniel Nephin
b924adb986 Fix a test that expects whitespace at the end of the line.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e2f7387906
Component: cli
2016-09-08 15:50:14 -04:00
Daniel Nephin
bc178aeaa8 Replace api/client imports with cli/command in experimental files.
Using

git grep -l 'client\.DockerCli' cli/command/stack/ | xargs sed -i -e 's/client\.DockerCli/command\.Dockercli/g'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 8f3e3fb6e5
Component: cli
2016-09-08 15:46:48 -04:00
Daniel Nephin
964a552e76 Move api/client -> cli/command
Using
  gomvpkg
     -from github.com/docker/docker/api/client
     -to github.com/docker/docker/cli/command
     -vcs_mv_cmd 'git mv {{.Src}} {{.Dst}}'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 3bd1eb4b76
Component: cli
2016-09-08 15:46:29 -04:00
Cao Weiwei
f7f411a109 Fix typo
Signed-off-by: Cao Weiwei <cao.weiwei30@zte.com.cn>
Upstream-commit: efdd29abcf
Component: cli
2016-08-28 21:30:14 +08:00
Daniel Nephin
29b743a981 Fix tests and windows service.
Support args to RunCommand
Fix docker help text test.
Fix for ipv6 tests.
Fix TLSverify option.
Fix TestDaemonDiscoveryBackendConfigReload
Use tempfile for another test.
Restore missing flag.
Fix tests for removal of shlex.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 2791c2ec28
Component: cli
2016-08-25 13:09:36 -04:00
Daniel Nephin
594214abab Remove old cli framework.
Also consolidate the leftover packages under cli.
Remove pkg/mflag.
Make manpage generation work with new cobra layout.
Remove remaining mflag and fix tests after rebase with master.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 38aca22dcd
Component: cli
2016-08-25 13:09:04 -04:00
Daniel Nephin
fbca637dc3 Update unit tests for new cobra root command.
Cleanup cobra integration
Update windows files for cobra and pflags
Cleanup SetupRootcmd, and remove unnecessary SetFlagErrorFunc.
Use cobra command traversal

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fc1a3d79f8
Component: cli
2016-08-25 13:09:04 -04:00
Daniel Nephin
93466186ca Convert docker root command to use pflag and cobra
Fix the daemon proxy for cobra commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 82a8cc1556
Component: cli
2016-08-25 13:09:03 -04:00
Daniel Nephin
8d4a32d8bc Convert dockerd to use cobra and pflag
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d08dd40a88
Component: cli
2016-08-25 13:09:03 -04:00
Daniel Nephin
91dde0851f Convert inspect to cobra.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 39c47a0e24
Component: cli
2016-08-03 10:36:47 -04:00
Akihiro Suda
b878e00458 Migrate exec command to cobra
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: b32ff5a1cd
Component: cli
2016-07-29 02:10:36 +00:00
Daniel Nephin
a303f0b676 Add a script to generate man pages from cobra commands.
Use the generate.sh script instead of md2man directly.
Update Dockerfile for generating man pages.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6f66e15f99
Component: cli
2016-07-19 12:00:21 -04:00
Sebastiaan van Stijn
80a0e584b9 Don't automagically add "[OPTIONS]" to usage
This removes the logic to automatically
add [OPTIONS] to the usage output.

The current logic was broken if a command
only has deprecated or hidden flags, and
in many cases put the [OPTIONS] in the
wrong location.

Requiring the usage string to be set
manually gives more predictable results,
and shouldn't require much to maintain.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 6393b5fcc7
Component: cli
2016-07-19 00:07:19 +02:00
allencloud
3caf06c122 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 5545165e02
Component: cli
2016-07-05 20:42:17 +08:00
Yong Tang
501e0f5cc5 Use spf13/cobra for docker update
This fix is part of the effort to convert commands to spf13/cobra #23211.

Thif fix coverted command `docker update` to use spf13/cobra

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 396d11999f
Component: cli
2016-06-22 11:06:44 -07:00
Tomasz Kopczynski
3c8b37971d Migrate info command to cobra
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
Upstream-commit: 91b49f8538
Component: cli
2016-06-17 22:11:33 +02:00
Anusha Ragunathan
b25f2d76d2 Avoid back and forth conversion between strings and bytes.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 63bccf7f31
Component: cli
2016-06-15 09:55:40 -07:00
Arnaud Porterie
ebfb6665f7 Merge pull request #23522 from docker/swarm-stack
Add experimental Docker Stack CLI commands
Upstream-commit: 8e224f9ef7
Component: cli
2016-06-15 02:22:01 +00:00
Tibor Vass
9dfb734479 plugins: experimental support for new plugin management
This patch introduces a new experimental engine-level plugin management
with a new API and command line. Plugins can be distributed via a Docker
registry, and their lifecycle is managed by the engine.
This makes plugins a first-class construct.

For more background, have a look at issue #20363.

Documentation is in a separate commit. If you want to understand how the
new plugin system works, you can start by reading the documentation.

Note: backwards compatibility with existing plugins is maintained,
albeit they won't benefit from the advantages of the new system.

Signed-off-by: Tibor Vass <tibor@docker.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 11c8c6c8fc
Component: cli
2016-06-14 14:20:27 -07:00