Commit Graph

38 Commits

Author SHA1 Message Date
769ccf7c93 Change "service inspect" to show defaults in place of empty fields
This adds a new parameter insertDefaults to /services/{id}. When this is
set, an empty field (such as UpdateConfig) will be populated with
default values in the API response. Make "service inspect" use this, so
that empty fields do not result in missing information when inspecting a
service.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 07f55b2eb5
Component: cli
2017-04-10 13:41:16 -07:00
ba8766363d 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: 4dcceaf70e
Component: cli
2017-04-03 18:40:54 -07:00
ce02b10e88 Enhance network inspect to show all tasks, local & non-local, in swarm mode
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Upstream-commit: faee4c005b
Component: cli
2017-03-13 17:52:08 -07:00
b725dc869d Add docker plugin upgrade
This allows a plugin to be upgraded without requiring to
uninstall/reinstall a plugin.
Since plugin resources (e.g. volumes) are tied to a plugin ID, this is
important to ensure resources aren't lost.

The plugin must be disabled while upgrading (errors out if enabled).
This does not add any convenience flags for automatically
disabling/re-enabling the plugin during before/after upgrade.

Since an upgrade may change requested permissions, the user is required
to accept permissions just like `docker plugin install`.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e301053ff5
Component: cli
2017-02-03 16:21:12 -05:00
e8abd684ad Add --filter enabled=true for docker plugin ls
This fix adds `--filter enabled=true` to `docker plugin ls`,
as was specified in 28624.

The related API and docs has been updated.

An integration test has been added.

This fix fixes 28624.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9a06063fea
Component: cli
2017-01-26 13:16:11 -08:00
3fa334d048 Merge pull request #28409 from dnephin/swagger-gen-more
Generate more types from the swagger spec
Upstream-commit: 540ba12eb4
Component: cli
2017-01-26 10:35:34 -08:00
755844d0cf Add SecretUpdate method to client
closes #28678

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Update cli/command/service/update_test.go

Fixes test build error:

  secretAPIClientMock does not implement "github.com/docker/docker/client".SecretAPIClient (missing SecretUpdate method)

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 266db2ecda
Component: cli
2017-01-13 09:51:05 -08:00
875d2b1b22 Convert ContainerTopOKResponse from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9eda7f4daf
Component: cli
2017-01-03 11:47:47 -05:00
b3c70d598c Generate ImageDeleteResponse from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f7e58c8c9b
Component: cli
2017-01-03 11:47:47 -05:00
c5e636a36d Generate ImageHistory from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 09bd661979
Component: cli
2017-01-03 11:47:44 -05:00
bff364bed9 Generate ContainerChanges from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0a623b251f
Component: cli
2017-01-03 09:35:40 -05:00
b70a86e634 Implement content addressability for plugins
Move plugins to shared distribution stack with images.

Create immutable plugin config that matches schema2 requirements.

Ensure data being pushed is same as pulled/created.

Store distribution artifacts in a blobstore.

Run init layer setup for every plugin start.

Fix breakouts from unsafe file accesses.

Add support for `docker plugin install --alias`

Uses normalized references for default names to avoid collisions when using default hosts/tags.

Some refactoring of the plugin manager to support the change, like removing the singleton manager and adding manager config struct.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 66f7194250
Component: cli
2016-12-23 13:29:58 -08:00
dcbf69e684 Enforce zero plugin refcount during disable.
When plugins have a positive refcount, they were not allowed to be
removed. However, plugins could still be disabled when volumes
referenced it and containers using them were running.

This change fixes that by enforcing plugin refcount during disable.
A "force" disable option is also added to ignore reference refcounting.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: fa7cceeb4a
Component: cli
2016-12-22 13:26:53 -08:00
11738d5e98 Convert DanglingOnly to Filters for docker image prune
This fix convert DanglingOnly in ImagesPruneConfig to Filters,
so that it is possible to maintain API compatibility in the future.

Several integration tests have been added to cover changes.

This fix is related to 28497.

A follow up to this PR will be done once this PR is merged.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: b3c4bacff2
Component: cli
2016-12-02 20:08:49 -08:00
d8c70a7d8d Add HTTP client timeout.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 43e89b5387
Component: cli
2016-11-21 13:11:40 -08:00
d5535f5557 Return warnings from service create and service update when digest pinning fails
Modify the service update and create APIs to return optional warning
messages as part of the response. Populate these messages with an
informative reason when digest resolution fails.

This is a small API change, but significantly improves the UX. The user
can now get immediate feedback when they've specified a nonexistent
image or unreachable registry.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: b58a973b18
Component: cli
2016-11-18 09:31:31 -08:00
a867bf217d move plugins out of experimental
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 1f6f5bec49
Component: cli
2016-11-10 15:51:32 -08:00
915d9ab391 api: Service Logs support
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: f88c041647
Component: cli
2016-11-10 13:46:02 -08:00
50e796a0be Revise swarm init/update flags, add unlocking capability
- Neither swarm init or swarm update should take an unlock key
- Add an autolock flag to turn on autolock
- Make the necessary docker api changes
- Add SwarmGetUnlockKey API call and use it when turning on autolock
- Add swarm unlock-key subcommand

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: a8dc2ff916
Component: cli
2016-11-09 16:09:00 -08:00
798fd349f4 Add support for swarm init lock and swarm unlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: dd81022c23
Component: cli
2016-11-09 16:09:00 -08:00
d1a4dc8e90 secrets: secret management for swarm
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: use tmpfs for swarm secrets

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: inject secrets from swarm secret store

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: use secret names in cli for service create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

switch to use mounts instead of volumes

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vendor: use ehazlett swarmkit

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: finish secret update

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 72ff77999c
Component: cli
2016-11-09 14:27:43 -05:00
10e4d1c58c always add but hide experimental cmds and flags
Signed-off-by: Victor Vieux <vieux@docker.com>

update cobra and use Tags

Signed-off-by: Victor Vieux <vieux@docker.com>

allow client to talk to an older server

Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 4f63bfb619
Component: cli
2016-11-08 04:55:27 -08:00
fe94d78afa Generate ContainerWait response from the swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 85a0bd062d
Component: cli
2016-10-31 11:19:53 -04:00
e10d258b88 generate AuthResponse type from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ca7404a80a
Component: cli
2016-10-31 11:16:03 -04:00
4a62b2cc8e Generate container update response from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 598e3a4874
Component: cli
2016-10-31 11:16:02 -04:00
bc55ba3a44 Use IDResponse for container create response.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f8cdc5ae71
Component: cli
2016-10-31 11:16:02 -04:00
71efaf6beb Add an IDResponse type
Generated from a swagger spec and use it for container exec response

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d4d914bd52
Component: cli
2016-10-31 11:16:02 -04:00
9557c883f5 Generate container create response from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e0f7f8d0dd
Component: cli
2016-10-31 11:16:02 -04:00
d817915a4e Use a config to generate swagger api types
Moves the resposne types to a package under api/types

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6dc945ab36
Component: cli
2016-10-31 11:13:41 -04:00
6fb78dfac2 Generate VolumesCreateRequest from the swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0325c474b8
Component: cli
2016-10-31 11:13:41 -04:00
daa7c9a587 Generate VolumeList response from the swagger spec
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 3e13296c4e
Component: cli
2016-10-31 11:13:41 -04:00
2cd2223423 add docker network prune
`docker network prune` prunes unused networks, including overlay ones.
`docker system prune` also prunes unused networks.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 171e533ba2
Component: cli
2016-10-25 06:43:54 +00:00
c2195d43eb Make experimental a runtime flag
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 31f5d9b543
Component: cli
2016-10-24 15:20:01 -07:00
ca3b5155d5 Generate api/types:Image from the swagger spec
and rename it to a more appropriate name ImageSummary.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a6a247fdf9
Component: cli
2016-10-20 13:24:23 -07:00
a476179204 Add subcommand prune to the container, volume, image and system commands
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: da8eef56ce
Component: cli
2016-09-29 07:42:53 -07:00
92c2c018ea Refactor to new events api
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: 9acc93282e
Component: cli
2016-09-22 14:42:06 -04:00
f35e1280b5 Windows: stats support
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 86c86fc166
Component: cli
2016-09-16 11:56:15 -07:00
f7bdcb1297 Move engine-api client package
This moves the engine-api client package to `/docker/docker/client`.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 3fff6acaa1
Component: cli
2016-09-07 11:05:58 -07:00