Commit Graph

8 Commits

Author SHA1 Message Date
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
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
Yong Tang c289179c99 Use spf13/cobra for docker port
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

Note: As part of this fix, a new function `RequiresMinMaxArgs(min int, max int)`
has been added in cli/required.go. This function restrict the args
to be at least min and at most max.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-06-06 05:32:34 -07:00
Vincent Demeester 4a7a5f3a57 Display "See 'docker cmd --help'." in error cases
This brings back this message in case missing arguments.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-04 16:19:54 +02:00
Vincent Demeester bbefa88a8c Use spf13/cobra for docker search
- Move image command search to `api/client/image/search.go`
- Use cobra :)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-06-03 19:50:01 +02:00
Daniel Nephin 25892d27be Use Args in cobra.Command to validate args.
Also re-use context.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 15:43:16 -07:00
Daniel Nephin 13cea4e58d Update usage and help to (almost) match the existing docker behaviour
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 14:41:37 -07:00
Daniel Nephin 4786ccd05c Migrate volume commands to cobra.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-05-31 14:41:37 -07:00