Commit Graph

101 Commits

Author SHA1 Message Date
0647af3a04 Fix typo
Signed-off-by: Cao Weiwei <cao.weiwei30@zte.com.cn>
Upstream-commit: cec564984eff0d850b9ea5814958cda8996f8d4e
Component: engine
2016-08-28 21:30:14 +08:00
8ad0a6fe8f 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: 6e7405ebd4df360bc84f651c977ece31283eb3ee
Component: engine
2016-08-25 13:09:36 -04:00
e263ef28d9 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: 14712f9ff0d20a3b64a60103608b8cc998909242
Component: engine
2016-08-25 13:09:04 -04:00
9d7fdddb73 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: 31bf9ca0c8cf29c1ba6cdc044e81c574161a0392
Component: engine
2016-08-25 13:09:04 -04:00
8c3fcf2de5 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: 0452ff5a4dd1b8fba707235d6f12a4038208f34b
Component: engine
2016-08-25 13:09:03 -04:00
894a7b4b95 Convert dockerd to use cobra and pflag
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fb83394714a9797f8ca5a08023a89560ce6c4aa3
Component: engine
2016-08-25 13:09:03 -04:00
bfaaeedf5b Convert inspect to cobra.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 851c388ad9aec0547ca7fde24c307b262eaab599
Component: engine
2016-08-03 10:36:47 -04:00
d22f93678b Migrate exec command to cobra
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 9d9dff3d0d9e92adf7c2e59f94c63766659d1d47
Component: engine
2016-07-29 02:10:36 +00:00
9ed298d21b 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: 00a8a40398263429f99b1a5f0be59048e1c6f38d
Component: engine
2016-07-19 12:00:21 -04:00
24235167aa 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: 4f0b5105524649169d765bb94c2806209ab21904
Component: engine
2016-07-19 00:07:19 +02:00
9921891219 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: edc307cb9213d11d9c5911b08ebd921a097939c0
Component: engine
2016-07-05 20:42:17 +08:00
82ca53bf58 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: 9765593c5f7cdd3ef16dbd0cae35bb68cf5542ef
Component: engine
2016-06-22 11:06:44 -07:00
65c6cdf69c Migrate info command to cobra
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
Upstream-commit: ac7a663c0b0ae147f42048dbc19e933635e22f75
Component: engine
2016-06-17 22:11:33 +02:00
c6bff6e7a4 Avoid back and forth conversion between strings and bytes.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: d6d448aab8e303a351b763f6a77b909fadb7344b
Component: engine
2016-06-15 09:55:40 -07:00
d191ef8662 Merge pull request #23522 from docker/swarm-stack
Add experimental Docker Stack CLI commands
Upstream-commit: c0677565dc99c67edea0e109e86a7a3dbaca28ac
Component: engine
2016-06-15 02:22:01 +00:00
848e510213 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: f37117045c5398fd3dca8016ea8ca0cb47e7312b
Component: engine
2016-06-14 14:20:27 -07:00
a4f6628660 Add experimental docker stack commands
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 71104bb592dc98467d3828394eabcbe50ca22ae4
Component: engine
2016-06-14 14:56:35 -04:00
4de05c442d Migrate cp command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 2e6db51de7dc293785520df81c6bb54aa96c84ca
Component: engine
2016-06-14 17:16:59 +02:00
e808aa4ed0 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: 12a00e60177ca42bfb1dd9ebd5dce1c7039da6dd
Component: engine
2016-06-13 22:17:15 -07:00
b552616d65 Migrate ps command to cobra
Signed-off-by: Tianyi Wang <capkurmagati@gmail.com>
Upstream-commit: 5a0b53b5a3d779e26a51230dfbdbf53bdd6b18d4
Component: engine
2016-06-14 11:59:37 +09:00
7f718199ae Merge pull request #23256 from vdemeester/migrate-pull-push-to-cobra
Use spf13/cobra for docker push and docker pull
Upstream-commit: f0193e278c31fb568c4cbbdc046e84a0d1a3390b
Component: engine
2016-06-13 14:16:42 -07:00
b87258cf19 Merge pull request #23265 from vdemeester/migrate-login-logout-to-cobra
Use spf13/cobra for docker login and docker logout
Upstream-commit: a502158d8a9b3a3949eb0bc0b087138ef65efabb
Component: engine
2016-06-13 14:15:46 -07:00
8b68fb04f6 Merge pull request #23309 from yongtang/23211-spf13-cobra-commit
Use spf13/cobra for docker commit
Upstream-commit: e6c49bf71b44a2513c37c08f488bf05089ac1f76
Component: engine
2016-06-13 14:13:37 -07:00
1397f0c340 Moving Image{Push,Pull}Privileged to trust.go
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ad4e20cd92079ec59b175b8a687ddadfa00037eb
Component: engine
2016-06-10 12:07:32 +02:00
5c061ea6cc Migrate push command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 9640e3a4514f96a890310757a09fd77a3c70e931
Component: engine
2016-06-10 12:07:28 +02:00
28e4f2b97c Migrate pull command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: fa67b984f8ec1aa7b8292777210f4643d4bc1bf0
Component: engine
2016-06-10 12:07:23 +02:00
b1ec8d8fe6 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: baf467722b3ca9c3beea5d49e26e7982230e7567
Component: engine
2016-06-10 12:04:29 +02:00
50d0524958 Migrate save command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6632fd27881faf899bbc33a8219a84ff18443270
Component: engine
2016-06-09 17:38:20 +02:00
7c6917a358 Migrate load command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8b1d40271fd2abcd6b703a2d9e6036bceb01c050
Component: engine
2016-06-09 17:28:33 +02:00
d19f22c981 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: 939a142c8db7054600cf911a8a19071f794da5f0
Component: engine
2016-06-08 19:00:58 -07:00
6828e7721d Merge pull request #23334 from WeiZhang555/cobra-stats
Migrate stats and events command to cobra
Upstream-commit: e884a515e96201d4027a6c9c1b4fa884fc2d21a3
Component: engine
2016-06-08 23:50:46 +02:00
6c2f2ddb74 Merge pull request #23343 from vdemeester/migrate-build-to-cobra
Use spf13/cobra for docker build
Upstream-commit: 3b08711bb75e30d850665312413a60f51114202f
Component: engine
2016-06-08 11:59:48 -07:00
81dc24449c Migrate stats and events command to cobra.
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 04cdb8e6025d9c0eac0462f3ad3f1ab33204e615
Component: engine
2016-06-08 10:39:53 +08:00
0e982325b5 Merge pull request #23333 from yongtang/23211-spf13-cobra-version
Use spf13/cobra for docker version
Upstream-commit: 13d101d53ce820d920accd429528374b41bfab4e
Component: engine
2016-06-07 23:46:01 +02:00
65f4a3fb13 Merge pull request #23311 from WeiZhang555/cobra-rm
Migrate rm command to cobra
Upstream-commit: ce96ce9e05d9b312b5454237680abadc7aa51092
Component: engine
2016-06-07 17:05:21 -04:00
41742b0589 Merge pull request #23292 from yongtang/23211-spf13-cobra-images
Use spf13/cobra for docker images
Upstream-commit: 08419313ec51b4e9c7db9e12c01cc6eea6cb8f16
Component: engine
2016-06-07 21:56:42 +02:00
216073fd2b Migrate docker build to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 60f447b655c960a48fa23e9eb86cc3bce4aeec37
Component: engine
2016-06-07 18:15:44 +02:00
298b0e2df9 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: ba7324ffcb23ba314fbab335a816004c4af7f3f3
Component: engine
2016-06-07 08:12:49 -07:00
92b754eb6a 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: bc82e51d7755e54dc6d0dcb93e6250bbff0bbd59
Component: engine
2016-06-07 08:11:34 -07:00
bade101cf9 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: 65a0034c67dbcc9e7a2baf285fca7d2435b689a3
Component: engine
2016-06-07 08:10:49 -07:00
238e9facc6 Migrate rm command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 7702f39fe8e642dbaede34af09472f5aea66a795
Component: engine
2016-06-07 22:19:16 +08:00
593816f86f Merge pull request #23307 from WeiZhang555/cobra-restart
Migrate restart command to cobra
Upstream-commit: 88323c861a70f94b88870b7614bc91d2fdfd98e0
Component: engine
2016-06-07 15:28:35 +02:00
8dabf407a1 Merge pull request #23297 from WeiZhang555/cobra-kill
Migrate kill command to cobra
Upstream-commit: 4f9e2f9fb4a3b6594a8ae094eeb3494d6b6ef2f9
Component: engine
2016-06-07 13:44:22 +02:00
08ad8f3172 Merge pull request #23269 from vdemeester/migrate-import-to-cobra
Use spf13/cobra for docker import
Upstream-commit: f061f556f2d3819f293e76a434c8212d613eca6b
Component: engine
2016-06-07 13:07:30 +02:00
5680e33f57 Migrate kill command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 732f08a822567aedeb9c9b27a84d8028c9ebb365
Component: engine
2016-06-07 17:20:33 +08:00
118d1a775e Migrate restart command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 264462d601ecd5d5e0d9e063e3d380a1e47d470a
Component: engine
2016-06-07 17:13:53 +08:00
9b4d5c68b5 Merge pull request #23285 from yongtang/23211-spf13-cobra-pause
Use spf13/cobra for docker pause
Upstream-commit: 6d4a7213e66145552af31fa0c88aebdd70eb5700
Component: engine
2016-06-07 10:01:42 +02:00
ec9cb4d4e9 Merge pull request #23291 from yongtang/23211-spf13-cobra-history
Use spf13/cobra for docker history
Upstream-commit: 804536df25fb8b3819a42e88da4fc94b3e449000
Component: engine
2016-06-07 10:00:39 +02:00
d313694ba9 Merge pull request #23290 from yongtang/23211-spf13-cobra-rename
Use spf13/cobra for docker rename
Upstream-commit: e83dad090a1e890ac870808d776fa584276bf7ab
Component: engine
2016-06-07 08:28:27 +02:00
e6c6c92dca Merge pull request #23316 from dnephin/error_on_invalid_docker_host
Fix a panic when the DOCKER_HOST was invalid using cobra commands
Upstream-commit: c077d4cc1e2f888d645520d1f7f68619b2f85ecc
Component: engine
2016-06-06 21:17:47 -04:00