Commit Graph

30 Commits

Author SHA1 Message Date
9f5ba149d1 Merge pull request #23276 from yongtang/23211-spf13-cobra-stop
Use spf13/cobra for docker stop
Upstream-commit: 713f88ec6f
Component: cli
2016-06-05 22:37:15 +02:00
2c18ee5cf6 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: 4770a4ba82
Component: cli
2016-06-05 10:25:21 -07:00
036d47c325 Migrate export command to cobra
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6ee903eea0
Component: cli
2016-06-05 16:42:19 +02:00
be19ee5f31 Merge pull request #23253 from vdemeester/carry-pr-23159
Carry #23159 : Use spf13/cobra for `docker run` and `docker create`
Upstream-commit: 8ad0a0ff95
Component: cli
2016-06-04 18:55:23 +02:00
53aae17014 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: 4a7a5f3a57
Component: cli
2016-06-04 16:19:54 +02:00
ed3db9e52f 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: 69d3037635
Component: cli
2016-06-04 13:57:30 +02:00
b31d040a09 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: 396c0660ab
Component: cli
2016-06-04 13:55:35 +02:00
c67e8b1f27 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: bbefa88a8c
Component: cli
2016-06-03 19:50:01 +02:00
c79c171774 Make the -h flag deprecated.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 82c85e1e83
Component: cli
2016-05-31 15:43:16 -07:00
625794a555 Use Args in cobra.Command to validate args.
Also re-use context.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 25892d27be
Component: cli
2016-05-31 15:43:16 -07:00
83e2fbd2b2 Support usage messages on bad flags.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 11ede59379
Component: cli
2016-05-31 15:43:16 -07:00
a0e9eab464 Update usage and help to (almost) match the existing docker behaviour
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 13cea4e58d
Component: cli
2016-05-31 14:41:37 -07:00
5848cf4f34 Migrate volume commands to cobra.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4786ccd05c
Component: cli
2016-05-31 14:41:37 -07:00
c70421e0ad cli: remove unnecessary initErr type
Signed-off-by: ZhangHang <stevezhang2014@gmail.com>
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 79b8543b54
Component: cli
2016-05-23 13:04:10 -07:00
996d076870 Merge pull request #22372 from dnephin/cli_cleanup
Reorganize client and cli packages
Upstream-commit: 3d58ff580f
Component: cli
2016-04-29 17:31:39 -07:00
2007fb140d 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: 89d78abcdc
Component: cli
2016-04-29 11:57:46 -04:00
63c0c343f9 Consolidate the files in client/
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 2bc929b019
Component: cli
2016-04-27 14:53:36 -04:00
c15182b1a0 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: a5c08fdbf0
Component: cli
2016-04-27 14:25:47 -04:00
c8402be431 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: 0c4f21fee3
Component: cli
2016-04-22 11:26:01 -04:00
c5f866738c fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 57171ee83c
Component: cli
2016-03-26 22:06:45 +08:00
8892876943 Update 'save' command help
Based on review feedback.

Signed-off-by: Martin Mosegaard Amdisen <martin.amdisen@praqma.com>
Upstream-commit: bcd0ac71ae
Component: cli
2016-03-22 08:16:52 +01:00
aebcbe8e0a Fix plural typo in 'save' command help
The form "Save an images" is not correct.
Either "Save an image" or "Save images" work, but since
the save commands accepts multiple images, I chose the
latter.

Fixed in all places where I could grep "Save an image(s)".

Signed-off-by: Martin Mosegaard Amdisen <martin.amdisen@praqma.com>
Upstream-commit: 54e7de9b12
Component: cli
2016-03-21 15:15:40 +01:00
c903000eea Remove some references to "register" through login
These were left-overs from the now deprecated
and removed functionality to registrer a new account
through "docker login"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 38f2513340
Component: cli
2016-03-01 17:33:23 +01:00
c1018a0d0f Update RestartPolicy of container
Add `--restart` flag for `update` command, so we can change restart
policy for a container no matter it's running or stopped.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 7a30e41b84
Component: cli
2016-02-20 17:06:32 +08:00
763bb430ef fix grammar error
it is not very important,but I think the modification makes the coders read more conviently!

Signed-off-by: huqun  <huqun@zju.edu.cn>
Upstream-commit: c73cd919b4
Component: cli
2016-02-12 16:11:31 +08:00
f8da06917e Remove usage of pkg sockets and tlsconfig.
- Use the ones provided by docker/go-connections, they are a drop in replacement.
- Remove pkg/sockets from docker.
- Keep pkg/tlsconfig because libnetwork still needs it and there is a
  circular dependency issue.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 9683297348
Component: cli
2015-12-29 19:27:12 -05:00
5d3e431b12 Implemet docker update command
It's used for updating properties of one or more containers, we only
support resource configs for now. It can be extended in the future.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: c9a59eb644
Component: cli
2015-12-28 19:19:26 +08:00
280ba2ad3c Added network to docker --help and help cleanup
Fixes https://github.com/docker/docker/issues/16909

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 22e3fabb45
Component: cli
2015-10-15 03:10:39 -07:00
6aa852474e Use consistent command description
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 2734a5821c
Component: cli
2015-10-08 08:46:21 -04:00
5f31535973 cli: new daemon command and new cli package
This patch creates a new cli package that allows to combine both client
and daemon commands (there is only one daemon command: docker daemon).

The `-d` and `--daemon` top-level flags are deprecated and a special
message is added to prompt the user to use `docker daemon`.

Providing top-level daemon-specific flags for client commands result
in an error message prompting the user to use `docker daemon`.

This patch does not break any old but correct usages.

This also makes `-d` and `--daemon` flags, as well as the `daemon`
command illegal in client-only binaries.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: c023f818aa
Component: cli
2015-07-23 19:44:46 -04:00