Commit Graph

667 Commits

Author SHA1 Message Date
94a0b24057 Merge pull request #32339 from aluzzardi/selinux
services: Add support for Credential Spec and SELinux
Upstream-commit: 1b132eb374
Component: cli
2017-04-08 01:37:17 +02:00
e5c62e50ec Merge pull request #32154 from dperny/refactor-logs
Refactor logs and support service logs with TTY 
Upstream-commit: 5cf0c294d4
Component: cli
2017-04-07 18:06:50 -04:00
02ce22cff9 services: Add support for Credential Spec and SELinux
- Defined "normalized" type for Credential Spec and SELinux
- Added --credential-spec to docker service create & update
- SELinux is API only at the time

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 032d4098fb
Component: cli
2017-04-07 11:30:54 -07:00
6a97164931 Merge pull request #32289 from adshmh/add-unit-tests-for-cli-command-secret-package
add unit tests for package cli/command/secret
Upstream-commit: bac1c4a2dd
Component: cli
2017-04-07 15:26:40 +02:00
7ca54a3979 refactor logs and support service logs /w tty
Refactor container logs system to make communicating log messages
internally much simpler. Move responsibility for marshalling log
messages into the REST server. Support TTY logs. Pave the way for fixing
the ambiguous bytestream format. Pave the way for fixing details.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 938bf846e3
Component: cli
2017-04-06 17:54:11 -07:00
cb9af8f804 Add support for update order
This parameter controls the order of operations when rolling out an
update task. Either the old task is stopped before starting the new one,
or the new task is started first, and the running tasks will briefly
overlap.

This commit adds Rollout to the API, and --update-order / --rollback-order
flags to the CLI.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 2805c2e929
Component: cli
2017-04-06 17:23:36 -07:00
832db1aaae Merge pull request #28938 from elifa/master
Grace period option to health checks.
Upstream-commit: cd315197e3
Component: cli
2017-04-06 19:23:56 +02:00
c2301d4a13 Merge pull request #32364 from aaronlehmann/preserve-env-order
cli: Preserve order of environment variables
Upstream-commit: fbddea6cac
Component: cli
2017-04-06 14:25:29 +02:00
1a49893201 Added start period option to health check.
Signed-off-by: Elias Faxö <elias.faxo@gmail.com>
Upstream-commit: a58f798fdf
Component: cli
2017-04-06 12:35:34 +02:00
5a8dfda9c4 Merge pull request #32251 from AkihiroSuda/run-mount
cli: add `--mount` to `docker run`
Upstream-commit: 738ac9e797
Component: cli
2017-04-05 22:34:47 +02:00
32f6be8e3e cli: add --mount to docker run
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 02b904588a
Component: cli
2017-04-05 04:52:08 +00:00
9696fa517f cli: Preserve order of environment variables
Unless we are adding or removing environment variables, their order
shouldn't be changed. This makes it look like the service's TaskSpec has
changed relative to the old version of the service, and containers need
to be redeployed.

The existing code always rebuilds the list of environment variables by
converting them to a map and back, but there's no reason to do this if
no environment variables are being added.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 71d1b0507e
Component: cli
2017-04-04 18:16:57 -07:00
5cb6ccf571 Add hidden placeholder of .Self for docker node ls --format
This commit adds a hidden placeholder of `.Self` for
`docker node ls --format` so that if the node is the same
as the current docker daemon, then a `*` is outputed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: b807d24e56
Component: cli
2017-04-04 12:46:44 -07:00
b2ea4b4caf added unit tests for package cli/command/secret
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: d5dca7c687
Component: cli
2017-04-04 15:35:08 -04:00
bb53f2056e Add --format for docker node ls
This fix tries to address the comment https://github.com/docker/docker/pull/30376#discussion_r97465334
where it was not possible to specify `--format` for `docker node ls`. The `--format` flag
is a quite useful flag that could be used in many places such as completion.

This fix implements `--format` for `docker node ls` and add `nodesFormat` in config.json
so that it is possible to specify the output when `docker node ls` is invoked.

Related documentations have been updated.

A set of unit tests have been added.

This fix is related to #30376.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4fc1d6782c
Component: cli
2017-04-04 11:26:35 -07:00
c25dd274e9 Merge pull request #30813 from yongtang/30232-service-ls-ports
Add `PORTS` field for `docker service ls` (`ingress`)
Upstream-commit: 9a5513b791
Component: cli
2017-04-04 17:04:27 +02:00
d9725d161b Merge pull request #32015 from dperny/service-logs-support-task-logs
Add Support for Service Task Logs
Upstream-commit: 4284efd232
Component: cli
2017-04-04 00:15:13 -07:00
1ea7589fcb Add support for task and arbitrary combo logs
Refactored the API to more easily accept new endpoints. Added REST,
client, and CLI endpoints for getting logs from a specific task. All
that is needed after this commit to enable arbitrary service log
selectors is a REST endpoint and handler.

Task logs can be retrieved by putting in a task ID at the CLI instead of
a service ID.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: b4ca6ebb09
Component: cli
2017-04-03 18:40:54 -07:00
f9c12f483a Add PORTS field for docker service ls (ingress)
This fix is related to 30232 wherw `docker service ls`
does not show `PORTS` information like `docker service ps`.

This fix adds `PORTS` fields for services that publish
ports in ingress mode.

Additional unit tests cases have been updated.

This fix is related to 30232.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e0d4e672a1
Component: cli
2017-04-03 18:40:15 -07:00
6c6797e0f8 Merge pull request #31144 from aaronlehmann/synchronous-service-commands
Synchronous service create and service update
Upstream-commit: 1551ffaa38
Component: cli
2017-04-03 17:44:03 -07:00
ec52e4b8df Synchronous service create and service update
Change "service create" and "service update" to wait until the creation
or update finishes, when --detach=false is specified. Show progress bars
for the overall operation and for each individual task (when there are a
small enough number of tasks), unless "-q" / "--quiet" is specified.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: d8ab3840e0
Component: cli
2017-04-03 09:46:01 -07:00
3e55a3b7e8 Merge pull request #31989 from aaronlehmann/node-ps-outside-swarm-mode
cli: Wrong error message from "node ps" outside swarm mode
Upstream-commit: d37d03c9dc
Component: cli
2017-04-03 16:15:24 +02:00
5d674e346c Merge pull request #32282 from mstanleyjones/improve-attach-desc
Clarify meaning of docker attach
Upstream-commit: a090dc9653
Component: cli
2017-04-01 20:52:26 +02:00
7ac9af3ace Merge pull request #31022 from jmzwcn/issue30994
docker version output is not consistent when there are downgrades or incompatibilities #30994
Upstream-commit: e959064068
Component: cli
2017-03-31 15:55:03 -07:00
15b935e3df Merge pull request #31800 from ripcurld0/checkpoint_ls
Use formatter in docker checkpoint ls
Upstream-commit: 4666c3e589
Component: cli
2017-03-31 15:54:22 -07:00
de8ce4417c Clarify meaning of docker attach
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 081ac522bd
Component: cli
2017-03-31 13:22:21 -07:00
0e14500771 Merge pull request #31599 from ripcurld0/diff_cmd_format
Use formatter in docker diff
Upstream-commit: e3596db1a2
Component: cli
2017-03-31 11:19:41 -07:00
b6718bde5c Merge pull request #32124 from vdemeester/system-inspect-secret
Add support for `--type=secret` in `docker inspect`
Upstream-commit: f066943a05
Component: cli
2017-03-30 17:01:57 +02:00
523a49ca3f Use formatter in docker diff
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 6fd69bd855
Component: cli
2017-03-30 10:33:40 +03:00
ac0fab4ce0 Docker version output is not consistent when there are downgrades or incompatibilities.
Signed-off-by: Daniel Zhang <jmzwcn@gmail.com>
Upstream-commit: ce972716be
Component: cli
2017-03-29 21:53:19 +08:00
ca5fbaaa27 Merge pull request #31830 from dnephin/refactor-cli-state
Small cleanup now that we have multiple details about the server stored on the cli
Upstream-commit: 9cfbcd4471
Component: cli
2017-03-29 13:36:32 +02:00
e52c9b7f1d Merge pull request #32186 from aaronlehmann/cluster-omitempty
api: Omit Cluster, Nodes, and Managers from swarm info when unavailable
Upstream-commit: 8356bd527c
Component: cli
2017-03-29 10:38:52 +02:00
5387d6dcb0 api: Omit Cluster, Nodes, and Managers from swarm info when unavailable
Currently these fields are included in the response JSON with zero
values. It's better not to include them if the information is
unavailable (for example, on a worker node).

This turns Cluster into a pointer so that it can be left out.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: e6445629d7
Component: cli
2017-03-28 14:20:25 -07:00
9942af3507 Add entrypoint flags to service cli.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 951fdd11cd
Component: cli
2017-03-28 11:24:19 -07:00
1a3472a804 Merge pull request #30810 from allencloud/make-secret-ls-support-filter
make secret ls support filters in CLI
Upstream-commit: d14a4d4231
Component: cli
2017-03-28 13:43:19 +02:00
cc486b1c0b Add support for --type=secret in docker inspect
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ba785f32f8
Component: cli
2017-03-28 10:48:48 +02:00
fb444d02c2 Merge pull request #31709 from dnephin/better-errors
Replace fmt.Errorf() with errors.Errorf() in the cli
Upstream-commit: dc2e0149a8
Component: cli
2017-03-28 10:17:46 +02:00
39ae1f89f8 Merge pull request #32128 from vdemeester/30836-set-alias-to-servicename
Set the alias to the service name instead of the network name
Upstream-commit: e2e4b0f9a8
Component: cli
2017-03-28 09:46:05 +02:00
8f6c4a1b5b Manually reorganize import paths to segregate stdlib and 3rd-party packages
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: d26a23ceb8
Component: cli
2017-03-27 18:21:59 -07:00
9e8fe95f89 Merge pull request #31714 from aboch/cingr
Allow user to replace ingress network
Upstream-commit: 24faf9edaf
Component: cli
2017-03-27 07:30:42 -07:00
e595996da4 Set the alias to the service name instead of the network name
This makes it work a little closer to compose part and it is more
correct 👼

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: aaf865edb5
Component: cli
2017-03-27 11:42:15 +02:00
6445b15529 make secret ls support filters in CLI
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: d6490e5de9
Component: cli
2017-03-27 10:16:45 +08:00
19fb367fca Allow user to modify ingress network
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 0f6dd9c2e8
Component: cli
2017-03-26 15:46:18 -07:00
39de28d502 Merge pull request #31976 from Microsoft/jjh/csbooboo
Windows: Remove --credentialspec flag
Upstream-commit: ca1aca0afe
Component: cli
2017-03-26 12:44:27 +02:00
25b1b9c3c2 Replace fmt.Errorf() with errors.Errorf() in the cli
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e9d6193dfd
Component: cli
2017-03-24 16:58:07 -04:00
d7600dd841 Windows: Remove --credentialspec flag
Signed-off-by: John Howard (VM) <jhoward@ntdev.microsoft.com>
Upstream-commit: c8f2ef1b1e
Component: cli
2017-03-23 10:01:04 -07:00
6aedaf0c02 Merge pull request #31986 from Microsoft/jjh/fix28267
Windows: Don't close client stdin handle to avoid hang
Upstream-commit: 8a16f32da7
Component: cli
2017-03-23 16:35:54 +01:00
1d07f176cb Return proper exit code on builder panic
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 82b04969b7
Component: cli
2017-03-21 19:09:23 -07:00
eb1ed29f05 cli: Wrong error message from "node ps" outside swarm mode
"docker node ps" behaves strangely outside swarm mode:

    $ docker node ps
    ID                  NAME                IMAGE               NODE                DESIRED STATE       CURRENT STATE       ERROR               PORTS
    Error: No such node:

It should explain that the node is not a swarm manager.

The reason this happens is that the argument to "docker node ps" defaults
to "self". The first thing the command does is try to resolve "self" to
a node ID using the /info endpoint. If there is no node ID, it tries to
use the empty string as an ID, and tries to GET /nodes/, which is not a
valid endpoint.

Change the command to check if the node ID is present in the /info
response. If it isn't, a swarm API endpoint can supply a useful error
message.

Also, avoid printing the column headers if the only following text is an
error.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: d59f6d0933
Component: cli
2017-03-21 17:01:07 -07:00
748bae2fe6 Windows: Don't close client stdin handle to avoid hang
Signed-off-by: John Howard (VM) <jhoward@microsoft.com>
Upstream-commit: e8be542957
Component: cli
2017-03-21 16:00:17 -07:00