Commit Graph

60 Commits

Author SHA1 Message Date
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
69e243a9fc Merge pull request #23274 from WeiZhang555/cobra-attach
Move attach command to cobra
Upstream-commit: ab821f9f9bf15cb7d356c6e48729f706807488db
Component: engine
2016-06-06 21:16:45 -04:00
83ae608b78 Use spf13/cobra for docker rename
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 70f7ccb304f9246bc9c2bfe0e30d3a2bd8fd42f8
Component: engine
2016-06-06 12:39:11 -07:00
13b554cbab Use spf13/cobra for docker pause
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 91731706c2c7d7efba78045ff8080f2b38d07c4f
Component: engine
2016-06-06 12:37:18 -07:00
9d8e920601 Fix a panic when the DOCKER_HOST was invalid using cobra commands.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 90244abc5bfc3be3f97bef16f15079c4fb96c1ff
Component: engine
2016-06-06 14:17:04 -04:00
812d9d1e28 Merge pull request #23306 from yongtang/23211-spf13-cobra-top
Use spf13/cobra for docker top
Upstream-commit: 5ce2f14f9bd12f1a66ad8f6f75d82d8fa8adc5e0
Component: engine
2016-06-06 10:14:10 -07:00
92cdf5f459 Merge pull request #23286 from yongtang/23211-spf13-cobra-port
Use spf13/cobra for docker port
Upstream-commit: 52da20b839f0de34c107ca80f3be1df89dcd698c
Component: engine
2016-06-06 18:55:37 +02:00
6a387aef09 Use spf13/cobra for docker history
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a76d387cdaa0b44d7d2b7550c2eb4c0fc53e7a47
Component: engine
2016-06-06 08:03:07 -07:00
9a954be4f2 Move attach command to cobra.
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: eceb8625a94e3504fca7b27d8156bcf11a93bf4f
Component: engine
2016-06-06 22:28:57 +08:00
0ca5072a60 Use spf13/cobra for docker top
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0f3866926763447c247bb24268923b5e50c006e1
Component: engine
2016-06-06 06:38:43 -07:00
1f876c8511 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>
Upstream-commit: d5971c230dc91fa8764dd5e9bc4124346ad06e02
Component: engine
2016-06-06 05:32:34 -07:00
49b97bdc07 Use spf13/cobra for docker wait
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 82f84a67d6d40d4a076927c618db475191f97da0
Component: engine
2016-06-06 05:09:41 -07:00
c5eb1854fa Migrate import command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 9d2e8abd302ae72e4dd5bddf325eb921a9e73a1b
Component: engine
2016-06-06 13:58:23 +02:00
62fb401985 Migrate network command to cobra
- Migrates network command and subcommands (connect, create, disconnect,
  inspect, list and remove) to spf13/cobra
- Create a RequiredExactArgs helper function for command that require an
  exact number of arguments.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 4bd202b00f7859ebeb4ba87511a0618ad08d0605
Component: engine
2016-06-06 10:28:52 +02:00
b24dce4b03 Merge pull request #23284 from yongtang/23211-spf13-cobra-logs
Use spf13/cobra for docker logs
Upstream-commit: 731bae674965a3ae8a300d8e285927f993727bab
Component: engine
2016-06-06 09:06:51 +02:00
bbcce85205 Merge pull request #23283 from yongtang/23211-spf13-cobra-diff
Use spf13/cobra for docker diff
Upstream-commit: 2becfab55fd8ad6ec1d02aea3cd6498a2f91ef68
Component: engine
2016-06-06 09:05:18 +02:00
787bdacdff Merge pull request #23268 from WeiZhang555/cobra-start
Migrate start command to cobra
Upstream-commit: c35d9f2611c4b1e43403010210708d9c50b838db
Component: engine
2016-06-06 08:59:42 +02:00
33bb9696ad Migrate start command to cobra
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 4f3625a2889aef4ea97e366fa0ed1e2383dd3aad
Component: engine
2016-06-06 09:53:18 +08:00
3fc5fabb4a Use spf13/cobra for docker unpause
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8ea7733a6390a67d6981888b857ab78b11c4c076
Component: engine
2016-06-05 17:29:52 -07:00
58f3ee3285 Use spf13/cobra for docker logs
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4f4b59cc435fbfef236017f3aa36145c1187426b
Component: engine
2016-06-05 15:51:35 -07:00
9c145d0655 Use spf13/cobra for docker diff
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 5899afae52b10d2457848c6e62a7476835befef3
Component: engine
2016-06-05 15:13:55 -07:00
7339550c4b Use spf13/cobra for docker rmi
Moves image command rmi to `api/client/image/remove.go` and use cobra :)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 60e48bd6bd24c559ed92c7217cd7798c85cbb644
Component: engine
2016-06-05 22:40:35 +02:00
cacb039bc5 Merge pull request #23276 from yongtang/23211-spf13-cobra-stop
Use spf13/cobra for docker stop
Upstream-commit: b25955833652b6b2079d7f3ac56759c563639ca9
Component: engine
2016-06-05 22:37:15 +02:00
236aacaf44 Use spf13/cobra for docker stop
This fix is part of the effort to convert commands to spf13/cobra #23211.

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

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 63d66d2796fa1916a6b40913a6a23063d6169d17
Component: engine
2016-06-05 10:25:21 -07:00
e533330f0a Migrate export command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b25e64183cd02bffe1ac1600e860551fca05d1f3
Component: engine
2016-06-05 16:42:19 +02:00
cfe1b2e499 Merge pull request #23253 from vdemeester/carry-pr-23159
Carry #23159 : Use spf13/cobra for `docker run` and `docker create`
Upstream-commit: 6b4a46f28266031ce1a1315f17fb69113a06efe1
Component: engine
2016-06-04 18:55:23 +02:00
36bd8f492b 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>
Upstream-commit: 6180c5c12e770a4bdf3f505944c9d907e5543fab
Component: engine
2016-06-04 16:19:54 +02:00
27d26eeb56 Convert 'docker create' to use cobra and pflag
Return the correct status code on flag parsins errors.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5ab24342258c70438ab8edf708ebc466b1677f38
Component: engine
2016-06-04 13:57:30 +02:00
d601c75fe5 Convert 'docker run' to a cobra command and to use pflags
Move container options into a struct so that tests should pass.
Remove unused FlagSet arg from Parse
Disable interspersed args on docker run

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a77f2450c70312f8c26877a18bfe2baa44d4abb9
Component: engine
2016-06-04 13:55:35 +02:00
cb2dd312aa 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>
Upstream-commit: a11ef10631dd9338aeda2e10fedea365a7471af1
Component: engine
2016-06-03 19:50:01 +02:00
7115ea3c86 Make the -h flag deprecated.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9b2bb64a3800619b5810e8baf59d72613e7ccd19
Component: engine
2016-05-31 15:43:16 -07:00
93473dcef1 Use Args in cobra.Command to validate args.
Also re-use context.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fc5a4514fbe1b402d2a0bff170486ac3de4bf8cc
Component: engine
2016-05-31 15:43:16 -07:00
354491fd5d Support usage messages on bad flags.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 54b5cce7e467a2b4fff76f95d465544f7be5b666
Component: engine
2016-05-31 15:43:16 -07:00
041d2192d1 Update usage and help to (almost) match the existing docker behaviour
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 667dcb0e8e550d1a80ee67c6d71979e8cfabea1f
Component: engine
2016-05-31 14:41:37 -07:00
fdda20f059 Migrate volume commands to cobra.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 69264beb4093c56e8c5b256a70e1a0150294c81c
Component: engine
2016-05-31 14:41:37 -07:00
32ca950a34 cli: remove unnecessary initErr type
Signed-off-by: ZhangHang <stevezhang2014@gmail.com>
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: b65e57bed534b00350d091db1894fdff1c4230d5
Component: engine
2016-05-23 13:04:10 -07:00
9d2d2e1d41 Merge pull request #22372 from dnephin/cli_cleanup
Reorganize client and cli packages
Upstream-commit: 90dfb3dacc56d789b70f5b5f3da6791465706c6c
Component: engine
2016-04-29 17:31:39 -07:00
b5a44200d5 Remove reflection on CLI init
before:
```
$ time docker --help
real  0m0.177s
user  0m0.000s
sys 0m0.040s
```

after:
```
$ time docker --help
real  0m0.010s
user  0m0.000s
sys 0m0.000s
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 5c8950e84d2384919f45209f8cc4cbf00ff29015
Component: engine
2016-04-29 11:57:46 -04:00
77424ecdbc Consolidate the files in client/
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 01a34e43b3f7a701ee1112b960740a5aaa6bdb93
Component: engine
2016-04-27 14:53:36 -04:00
63df8770d3 Cleanup the structure of the cli package.
Move all flags into cli/flags
Move usage help into cli/usage.go

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 33c9edaf6c5401fc1891713d1ad8d861e6cea51f
Component: engine
2016-04-27 14:25:47 -04:00
dcd6f9747a Build two binaries client and daemon.
Add a proxy to support 'docker daemon'
Fix configFile option, and remove a test that is no longer relevant.
Remove daemon build tag.
Remove DOCKER_CLIENTONLY from build scripts.

Signed-off-by: Daniel Nephin <dnephin@docker.com>

Change docker-daemon to dockerd.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9e7651db4d464649bc32cf346fdee8c6900ebe0f
Component: engine
2016-04-22 11:26:01 -04:00
35980664e6 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 6983f05b42527dec87de9b2ecaf1d948038860fc
Component: engine
2016-03-26 22:06:45 +08:00