Commit Graph

105 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
3caf06c122 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 5545165e02
Component: cli
2016-07-05 20:42:17 +08:00
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
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
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
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
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
d3a41b659b Add experimental docker stack commands
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 3fe470656a
Component: cli
2016-06-14 14:56:35 -04:00
a9bb747fe8 Migrate cp command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 50626d2b2b
Component: cli
2016-06-14 17:16:59 +02:00
dab4dc32bc Add Swarm management CLI commands
As described in our ROADMAP.md, introduce new Swarm management commands
to call to the corresponding API endpoints.

This PR is fully backward compatible (joining a Swarm is an optional
feature of the Engine, and existing commands are not impacted).

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 408531dafa
Component: cli
2016-06-13 22:17:15 -07:00
331a2b56c2 Migrate ps command to cobra
Signed-off-by: Tianyi Wang <capkurmagati@gmail.com>
Upstream-commit: 92e6b85fa0
Component: cli
2016-06-14 11:59:37 +09:00
6a06670ae1 Merge pull request #23256 from vdemeester/migrate-pull-push-to-cobra
Use spf13/cobra for docker push and docker pull
Upstream-commit: f09c355dc2
Component: cli
2016-06-13 14:16:42 -07:00
c3d680f66e Merge pull request #23265 from vdemeester/migrate-login-logout-to-cobra
Use spf13/cobra for docker login and docker logout
Upstream-commit: 6ee236be1d
Component: cli
2016-06-13 14:15:46 -07:00
7ec9fe27ce Merge pull request #23309 from yongtang/23211-spf13-cobra-commit
Use spf13/cobra for docker commit
Upstream-commit: fdc52d0f51
Component: cli
2016-06-13 14:13:37 -07:00
c516b89c83 Moving Image{Push,Pull}Privileged to trust.go
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0679ae5bf4
Component: cli
2016-06-10 12:07:32 +02:00
08cd8b5ab5 Migrate push command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 16dbf630a2
Component: cli
2016-06-10 12:07:28 +02:00
7f453bbb70 Migrate pull command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 27fd1bffb0
Component: cli
2016-06-10 12:07:23 +02:00
102ec2c2f8 Migrate login & logout command to cobra
Also moves some common stuff around :
- `api/client/registry.go` for registry related
method (`ElectAuthServer`, …)
- `api/client/credentials.go` to interact with credentials

Migrate logout command to cobra

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d4fef62ce0
Component: cli
2016-06-10 12:04:29 +02:00
2c2e707ce1 Migrate save command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 171adb0b0f
Component: cli
2016-06-09 17:38:20 +02:00
2710da2962 Migrate load command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ca96b906bc
Component: cli
2016-06-09 17:28:33 +02:00
65ee11dbcd Use spf13/cobra for docker commit
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

NOTE: `RequiresMinMaxArgs()` has been renamed to `RequiresRangeArgs()`.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 43fdd6f2fa
Component: cli
2016-06-08 19:00:58 -07:00
e21f9a847f Merge pull request #23334 from WeiZhang555/cobra-stats
Migrate stats and events command to cobra
Upstream-commit: 58a97cc11e
Component: cli
2016-06-08 23:50:46 +02:00
e684c3f13e Merge pull request #23343 from vdemeester/migrate-build-to-cobra
Use spf13/cobra for docker build
Upstream-commit: b2acf69e03
Component: cli
2016-06-08 11:59:48 -07:00
7fd502822b Migrate stats and events command to cobra.
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 3f5ac2f50f
Component: cli
2016-06-08 10:39:53 +08:00
f27a86296b Merge pull request #23333 from yongtang/23211-spf13-cobra-version
Use spf13/cobra for docker version
Upstream-commit: 92daed0111
Component: cli
2016-06-07 23:46:01 +02:00
2fcd2b6a2c Merge pull request #23311 from WeiZhang555/cobra-rm
Migrate rm command to cobra
Upstream-commit: 51bd610ce6
Component: cli
2016-06-07 17:05:21 -04:00
a82912aacd Merge pull request #23292 from yongtang/23211-spf13-cobra-images
Use spf13/cobra for docker images
Upstream-commit: e428ca60d1
Component: cli
2016-06-07 21:56:42 +02:00
640b5bcdfe Migrate docker build to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 15083c2e98
Component: cli
2016-06-07 18:15:44 +02:00
528e8c062e Use spf13/cobra for docker tag
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4951a30626
Component: cli
2016-06-07 08:12:49 -07:00
b125b6b0a7 Use spf13/cobra for docker version
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

NOTE: Most of the commands like `run`, `images` etc. goes to packages of
`container`, `image`, `network`, etc. Didn't find a good place for
`docker version` so just use the package `client` for now.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7e043735b6
Component: cli
2016-06-07 08:11:34 -07:00
fb468efb0a Use spf13/cobra for docker images
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

NOTE: As part of this fix, a new function `RequiresMaxArgs()`
has been defined in `cli/required.go`. This func returns an
error if there is not at most max args

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: fcd9f9f7bd
Component: cli
2016-06-07 08:10:49 -07:00
a90edeef1d Migrate rm command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 50b375d189
Component: cli
2016-06-07 22:19:16 +08:00
9882b02256 Merge pull request #23307 from WeiZhang555/cobra-restart
Migrate restart command to cobra
Upstream-commit: c278d97aad
Component: cli
2016-06-07 15:28:35 +02:00
2b1216a265 Merge pull request #23297 from WeiZhang555/cobra-kill
Migrate kill command to cobra
Upstream-commit: 95ea0fd93c
Component: cli
2016-06-07 13:44:22 +02:00
10cfe98395 Merge pull request #23269 from vdemeester/migrate-import-to-cobra
Use spf13/cobra for docker import
Upstream-commit: 7300075b39
Component: cli
2016-06-07 13:07:30 +02:00
e5717aed2f Migrate kill command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 05c7e2e124
Component: cli
2016-06-07 17:20:33 +08:00
1422866b88 Migrate restart command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 254cce44cd
Component: cli
2016-06-07 17:13:53 +08:00