Commit Graph

23 Commits

Author SHA1 Message Date
David Calavera df46bfdd4d Fix ignore `-q` flag in `docker ps` when there is a default format.
Docker ps default format should not take precedence over cli flags.
This happens effectively for other flags except `-q`.
We need to let the cli to set the format as table to print the
expected output with `-q`.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-08-17 10:48:04 -07:00
Tibor Vass 96ce3a194a 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>
2015-07-23 19:44:46 -04:00
Phil Estes 542b58d8f7 ps --format: Add config.js doc, fix gofmt, add integration tests
Re-add the docs from @calavera's PR to the moved cli cmd reference docs.
Fix gofmt and vet issues from carried commits
Add integration test for using format with --no-trunc and multi-names
Fix custom_test map order dependency on expected value check
Add docs to reference/commandline/ps.md
Remove "-F" flag option from original carried PR content

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-07-22 12:51:16 -04:00
David Calavera 37209190c7 Docker ps custom formatting.
Docker-DCO-1.1-Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-20 22:46:55 -04:00
Jeff Mickey de0e883331 docker ps: add fields for ordering and column selection
* api/client/ps.go: Refactor CmdPs to use a fields list of
  characters to determine which columns to print on `docker ps`
  invocation.

This adds an ability for the docker command to print the columns of
output in arbitrary order.

Signed-off-by: Jeff Mickey <j@codemac.net>

Docker-DCO-1.1-Signed-off-by: Jeff Mickey <j@codemac.net>
2015-07-20 22:45:21 -04:00
John Howard 615681f517 Windows: Remove meaningless warnings on docker info
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-10 10:06:20 -07:00
Ma Shimiao 91a496055c api/client: close the returned io.ReadCloser
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-07-08 10:06:25 +08:00
Sujith Haridasan 8a9ed09746 Display when a container is in --net=host in docker ps
Display */tcp, */udp when a container is in --net=host in docker ps

Signed-off-by: Sujith Haridasan <sujith.h@gmail.com>
2015-06-22 11:44:33 +05:30
Josh Hawn 86d6a5b11f Merge pull request #13869 from jlhawn/multi_line_help_usage
api/client: Allow for multi-line usage help
2015-06-15 14:50:17 -07:00
Josh Hawn 0cdc3b7539 api/client: have cli.call() return headers
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-06-10 16:20:13 -07:00
Josh Hawn 4cb0c93f92 api/client: Allow for multi-line usage help
Subcommands can provide multiple usage synopses.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2015-06-10 16:14:45 -07:00
Victor Vieux b261ce5fb0 Revert "Fix inconsistent date formats in API"
This reverts commit 945fc9d882.

Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-14 17:31:45 -07:00
Hu Keping 945fc9d882 Fix inconsistent date formats in API
Prior to this patch, the response of
- GET /images/json
- GET /containers/json
- GET /images/(name)/history

display the Created Time as UNIX format which doesn't make sense.

These should be more readable as CLI command `docker inspect` shows.

Due to the case that an older client with a newer version daemon, we
need the version check for now.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-05-14 18:58:55 +08:00
Antonio Murdaca 844538142d Small if err cleaning
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-27 21:50:33 +02:00
Antonio Murdaca c30a55f14d Refactor utils/utils, fixes #11923
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-14 01:37:36 +02:00
Doug Davis 1bfa80bdd9 Remove Job from PS API
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-08 10:30:17 -07:00
Doug Davis 065648a832 Last step in removing engine.Tabel from api/client/*
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-06 10:55:53 -07:00
Antonio Murdaca 5670c6c695 Refactor utils/flags.go, fixes #11892
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-29 03:22:46 +02:00
Don Kjer 6b2eeaf896 Fix for issue 9922: private registry search with auth returns 401
Signed-off-by: Don Kjer <don.kjer@gmail.com>
2015-03-26 18:59:16 +00:00
Michael Crosby 708ed9d87a Merge pull request #11766 from peggyl/11596-api-commands-godoc
Add godoc-style docstrings to Cmd... methods
2015-03-26 10:58:35 -07:00
Peggy Li a465e26bb0 Fix golint errors for casing in api/client package
Signed-off-by: Peggy Li <peggyli.224@gmail.com>
2015-03-25 19:54:29 -07:00
Peggy Li b5d0380108 Add godoc-style docstrings to Cmd... methods
Signed-off-by: Peggy Li <peggyli.224@gmail.com>
2015-03-25 14:17:11 -07:00
Joey Gibson 58690c9cca api/client - The code for all cli commands are in one file #11610
Signed-off-by: Joey Gibson <joey@joeygibson.com>
2015-03-24 23:57:23 -04:00