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: 96ce3a194aab2807fdd638825b9ea7cb9ba55c36
Component: engine
This commit is contained in:
Tibor Vass
2015-07-23 19:44:46 -04:00
parent bbca49004b
commit 12234c67d4
67 changed files with 913 additions and 614 deletions
@@ -43,7 +43,8 @@ func (s *DockerDaemonSuite) TestCliProxyProxyTCPSock(c *check.C) {
c.Fatal("could not find ip to connect to")
}
if err := s.d.Start("-H", "tcp://"+ip+":2375"); err != nil {
s.d.GlobalFlags = []string{"-H", "tcp://" + ip + ":2375"}
if err := s.d.Start(); err != nil {
c.Fatal(err)
}