Commit Graph

8837 Commits

Author SHA1 Message Date
Daniel Nephin 38aca22dcd 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>
2016-08-25 13:09:04 -04:00
Daniel Nephin 3b178887a7 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>
2016-08-25 13:09:04 -04:00
Daniel Nephin fc1a3d79f8 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>
2016-08-25 13:09:04 -04:00
Daniel Nephin 58a14cd18c 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>
2016-08-25 13:09:04 -04:00
Daniel Nephin 82a8cc1556 Convert docker root command to use pflag and cobra
Fix the daemon proxy for cobra commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-25 13:09:03 -04:00
Daniel Nephin 08784d7e0e Convert docker root command to use pflag and cobra
Fix the daemon proxy for cobra commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-25 13:09:03 -04:00
Daniel Nephin d08dd40a88 Convert dockerd to use cobra and pflag
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-25 13:09:03 -04:00
Daniel Nephin 23dd85befd Convert dockerd to use cobra and pflag
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-25 13:09:03 -04:00
Daniel Nephin 39c47a0e24 Convert inspect to cobra.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-03 10:36:47 -04:00
Akihiro Suda b32ff5a1cd Migrate exec command to cobra
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-07-29 02:10:36 +00:00
Daniel Nephin 6f66e15f99 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>
2016-07-19 12:00:21 -04:00
Sebastiaan van Stijn 6393b5fcc7 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>
2016-07-19 00:07:19 +02:00
allencloud 5545165e02 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-07-05 20:42:17 +08:00
Yong Tang 396d11999f 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>
2016-06-22 11:06:44 -07:00
Tomasz Kopczynski 91b49f8538 Migrate info command to cobra
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
2016-06-17 22:11:33 +02:00
Anusha Ragunathan 63bccf7f31 Avoid back and forth conversion between strings and bytes.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-06-15 09:55:40 -07:00
Arnaud Porterie 8e224f9ef7 Merge pull request #23522 from docker/swarm-stack
Add experimental Docker Stack CLI commands
2016-06-15 02:22:01 +00:00
Tibor Vass 11c8c6c8fc 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>
2016-06-14 14:20:27 -07:00
Daniel Nephin 3fe470656a Add experimental docker stack commands
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-06-14 14:56:35 -04:00
Vincent Demeester 50626d2b2b Migrate cp command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-14 17:16:59 +02:00
Daniel Nephin 408531dafa 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>
2016-06-13 22:17:15 -07:00
Tianyi Wang 92e6b85fa0 Migrate ps command to cobra
Signed-off-by: Tianyi Wang <capkurmagati@gmail.com>
2016-06-14 11:59:37 +09:00
Alexander Morozov f09c355dc2 Merge pull request #23256 from vdemeester/migrate-pull-push-to-cobra
Use spf13/cobra for docker push and docker pull
2016-06-13 14:16:42 -07:00
Alexander Morozov 6ee236be1d Merge pull request #23265 from vdemeester/migrate-login-logout-to-cobra
Use spf13/cobra for docker login and docker logout
2016-06-13 14:15:46 -07:00
Alexander Morozov fdc52d0f51 Merge pull request #23309 from yongtang/23211-spf13-cobra-commit
Use spf13/cobra for docker commit
2016-06-13 14:13:37 -07:00
Vincent Demeester 0679ae5bf4 Moving Image{Push,Pull}Privileged to trust.go
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-10 12:07:32 +02:00
Vincent Demeester 16dbf630a2 Migrate push command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-10 12:07:28 +02:00
Vincent Demeester 27fd1bffb0 Migrate pull command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-10 12:07:23 +02:00
Vincent Demeester d4fef62ce0 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>
2016-06-10 12:04:29 +02:00
Daniel Nephin 90e5326097 Support running 'docker help daemon'
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-06-09 13:22:03 -04:00
Vincent Demeester 171adb0b0f Migrate save command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-09 17:38:20 +02:00
Vincent Demeester ca96b906bc Migrate load command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-09 17:28:33 +02:00
Yong Tang 43fdd6f2fa 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>
2016-06-08 19:00:58 -07:00
Vincent Demeester 58a97cc11e Merge pull request #23334 from WeiZhang555/cobra-stats
Migrate stats and events command to cobra
2016-06-08 23:50:46 +02:00
Alexander Morozov b2acf69e03 Merge pull request #23343 from vdemeester/migrate-build-to-cobra
Use spf13/cobra for docker build
2016-06-08 11:59:48 -07:00
Zhang Wei 3f5ac2f50f Migrate stats and events command to cobra.
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-08 10:39:53 +08:00
Vincent Demeester 92daed0111 Merge pull request #23333 from yongtang/23211-spf13-cobra-version
Use spf13/cobra for docker version
2016-06-07 23:46:01 +02:00
Brian Goff 51bd610ce6 Merge pull request #23311 from WeiZhang555/cobra-rm
Migrate rm command to cobra
2016-06-07 17:05:21 -04:00
Sebastiaan van Stijn e428ca60d1 Merge pull request #23292 from yongtang/23211-spf13-cobra-images
Use spf13/cobra for docker images
2016-06-07 21:56:42 +02:00
Vincent Demeester 15083c2e98 Migrate docker build to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-07 18:15:44 +02:00
Yong Tang 4951a30626 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>
2016-06-07 08:12:49 -07:00
Yong Tang 7e043735b6 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>
2016-06-07 08:11:34 -07:00
Yong Tang fcd9f9f7bd 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>
2016-06-07 08:10:49 -07:00
Zhang Wei 50b375d189 Migrate rm command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-07 22:19:16 +08:00
Sebastiaan van Stijn c278d97aad Merge pull request #23307 from WeiZhang555/cobra-restart
Migrate restart command to cobra
2016-06-07 15:28:35 +02:00
Sebastiaan van Stijn 95ea0fd93c Merge pull request #23297 from WeiZhang555/cobra-kill
Migrate kill command to cobra
2016-06-07 13:44:22 +02:00
Sebastiaan van Stijn 7300075b39 Merge pull request #23269 from vdemeester/migrate-import-to-cobra
Use spf13/cobra for docker import
2016-06-07 13:07:30 +02:00
Zhang Wei 05c7e2e124 Migrate kill command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-07 17:20:33 +08:00
Zhang Wei 254cce44cd Migrate restart command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-06-07 17:13:53 +08:00
Vincent Demeester 90a2068a6b Merge pull request #23285 from yongtang/23211-spf13-cobra-pause
Use spf13/cobra for docker pause
2016-06-07 10:01:42 +02:00