Commit Graph

447 Commits

Author SHA1 Message Date
0cb4581486 Merge pull request #26830 from dnephin/man-desc-in-files
Move the command description to a markdown file for man pages
Upstream-commit: e4223e33617b9964ea5ecc5a4782171eea7b35d6
Component: engine
2017-01-03 17:47:49 +01:00
eb7043f1ff Merge pull request #25234 from yongtang/25228-service-ps-multiple-ID
Support multiple service IDs on "docker service ps"
Upstream-commit: 18265591c2ae16b2fc831e9922fb27542f97fcf6
Component: engine
2017-01-03 12:40:24 +01:00
93dfbee84c Merge pull request #29806 from albers/fix-plugin-inspect-usage
Fix usage message of `plugin inspect`
Upstream-commit: 187592583c7ba804e8f52b2594cfd496b4c78072
Component: engine
2017-01-02 19:30:24 +01:00
c1643b271a Remove deadcode from service/opts.go, SecretOpt
`SecretOpt` is in the `opts` package, this one is never used, so it's
dead code, removing it 👼.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 84cb2d100b440db2213588e864d0df58315eb50b
Component: engine
2017-01-02 11:19:33 +01:00
8f0e0230a0 Fix usage message of plugin inspect
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 1b58d0bc51e2bfc9e268dab762d1d891c18890c9
Component: engine
2016-12-31 09:55:04 -08:00
ce228c30e5 Merge pull request #29609 from dnephin/add-compose-file-package
Replace the vendored aanand/compose-file with a local copy
Upstream-commit: edaa3c6f07385f0c08bc62811508c56d821e696f
Component: engine
2016-12-29 15:12:59 -08:00
ce3330c6eb Merge pull request #29683 from vdemeester/runconfig-clean
Clean some stuff from runconfig that are cli only…
Upstream-commit: 1dd941077653bc93ee4141c4d2bac90534678e3f
Component: engine
2016-12-29 17:42:08 +01:00
7e8e39781a Merge pull request #29687 from thaJeztah/cleanup-cli-command-container
Minor cleanups in cli/command/container
Upstream-commit: 4d5cba127b7fccdbc00cfca5fc31d7bf655d8c5e
Component: engine
2016-12-29 09:31:46 +01:00
681436c413 Read long description from a file.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 78101b26afe4f7edbc4218d49238044e3feef54b
Component: engine
2016-12-28 16:08:23 -05:00
9d3a22d754 Merge pull request #29313 from vdemeester/move-cli-config
Move package cliconfig to cli/config
Upstream-commit: 4f657ff55cc91e9196ae980ddf692f763dced271
Component: engine
2016-12-28 09:05:51 -08:00
98526f223f Merge pull request #29668 from dmcgowan/plugins-dct
Support Docker Content Trust for plugins
Upstream-commit: a412c1b7a03e24ba733809924c680f395fad2655
Component: engine
2016-12-28 10:43:32 -05:00
22afb90b38 Merge pull request #29752 from allencloud/fix-nits-in-comments
fix nits in comments
Upstream-commit: 9fab262690a1e9c465687b3dc22f84b053c5624f
Component: engine
2016-12-28 08:33:48 -05:00
edfbbc6ec9 Replace vendor of aanand/compose-file with a local copy.
Add go-bindata for including the schema.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f5af9b9738892b5988f987ce5fbce6e31a10e768
Component: engine
2016-12-27 16:17:24 -05:00
17e3d2d6b6 Support for docker content trust for plugins
Add integration test for docker content trust

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 14e8bba4f5d39e7a540bee44c133a1e73db48f84
Component: engine
2016-12-27 12:51:00 -08:00
96e9f269ff Merge pull request #29666 from tonistiigi/client-deps
Clean up client binary dependencies
Upstream-commit: bf6eb855391e166a65db284567686fafbe4a9a0a
Component: engine
2016-12-27 15:01:24 -05:00
e23a7bc09c Merge pull request #29716 from yongtang/28885-docker-stack-ps-all
Remove `docker stack ps -a` to match removal of `docker service/node ps -a`
Upstream-commit: efbb23f3e6c585b64e7898a38b0088a0992ea883
Component: engine
2016-12-27 13:56:01 -05:00
0cddfcad2f fix nits in comments
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 6fb05778ba241b344dd9014ff1091e3f70a8b40c
Component: engine
2016-12-27 23:30:50 +08:00
8fc615e678 Move builder cli helper functions to own pkg
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: feaf5902f650f2326e1c41e82dfe28962f1ba46e
Component: engine
2016-12-26 18:53:22 -08:00
1c2e3ffc9c Define PushResult in api types
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 13222160e84a01db2174c0dbf3000761a756fd72
Component: engine
2016-12-26 18:53:22 -08:00
98d0c42181 Remove docker stack ps -a to match removal of docker service/node ps -a
In #28507 and #28885, `docker service/node ps -a` has been removed so that
information about slots are show up even without `-a` flag.

The output of `docker stack ps` reused the same output as `docker service/node ps`.
However, the `-a` was still there. It might make sense to remove `docker stack ps -a`
as well to bring consistency with `docker service/node ps`.

This fix is related to #28507, #28885, and #25983.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9155e14e77a8235791a6de752f6f43e83308e23d
Component: engine
2016-12-26 13:47:43 -08:00
e55475c7b3 split function out of command description scope
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0b243acbfccddc150d4bb8321d41713a67e039fc
Component: engine
2016-12-26 13:50:00 +08:00
6bf1e2d028 Minor cleanups in cli/command/container
This change does some minor cleanups in the
cli/command/container package;

- sort imports
- replace `fmt.Fprintf()` with `fmt.Fprintln()` if no formatting is used
- replace `fmt.Errorf()` with `errors.New()` if no formatting is used
- remove some redundant `else`'s

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: d5179cb4d48c5c0b6e5b63bcd6e24bb926316f5c
Component: engine
2016-12-26 01:33:25 +01:00
72d129024d Move package cliconfig to cli/config
I felt it made more sence 👼

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ce964a607ad7395af7b74a0ba1efc5ab3cb15790
Component: engine
2016-12-25 20:31:52 +01:00
0de1da63ca Clean some stuff from runconfig that are cli only…
… or could be in `opts` package. Having `runconfig/opts` and `opts`
doesn't really make sense and make it difficult to know where to put
some code.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c424be21b7aa732681ed019b5e547a99fdc2afa5
Component: engine
2016-12-24 13:16:00 +01:00
478844dff8 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: 3d86b0c79b16334ce5836c0315e4c310b84c2e17
Component: engine
2016-12-23 13:29:58 -08:00
e6fc7a5576 Merge pull request #29599 from anusha-ragunathan/refcount
Enforce zero plugin refcount during disable, not remove.
Upstream-commit: d1dfc1a5ef95dc5621a07915f9786199442043c7
Component: engine
2016-12-22 15:38:54 -08:00
9eac558235 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: 8cb2229cd18c53bdbf36301f26db565a50027d6a
Component: engine
2016-12-22 13:26:53 -08:00
74f57538fd Support multiple service IDs on "docker service ps"
This fix tries to address issue raised in 25228 to support
multiple service IDs on `docker service ps`.

Multiple IDs are allowed with `docker service ps ...`, and
related documentation has been updated.

A test has been added to cover the changes.

This fix fixes 25228.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 70942352d56779b6c428efa1c2d4cb8a45c1dfa1
Component: engine
2016-12-22 11:33:47 -08:00
433a6ae35a Merge pull request #29314 from vdemeester/no-more-utils
Remove the utils package
Upstream-commit: b9ee31ae027bbd62477fea3f58023c90f051db00
Component: engine
2016-12-22 15:21:05 +01:00
a961c58e58 Merge pull request #29603 from mstanleyjones/docker_diff_improvements
Clarify what docker diff shows
Upstream-commit: 0ca3e84227a04c0c6256f55b92e9205bd1ca9309
Component: engine
2016-12-22 15:15:01 +01:00
4313743ab7 Merge pull request #29212 from yongtang/29185-docker-inspect
Fix `docker plugin inspect <unkown object>` issue on Windows
Upstream-commit: e91604c0d2d15cacd06e911cab360291a79e5f37
Component: engine
2016-12-21 15:47:17 -05:00
60c04ae8d4 Merge pull request #28714 from thaJeztah/move-logdriver-check-to-daemon
move check for supported drivers to daemon
Upstream-commit: 267d6935c5dcb806d24df8dd78d3d053773f8c19
Component: engine
2016-12-21 13:47:30 -05:00
a72ca85c0c Merge pull request #29491 from yongtang/12162016-stats-error
Improve error output for `docker stats ...`
Upstream-commit: d65d5db2a0351f07060f02c2d2466a12c1cfcd89
Component: engine
2016-12-21 13:19:20 -05:00
97f0ab72fa Merge pull request #29527 from allencloud/change-minor-mistake
change minor mistake of spelling
Upstream-commit: b2e348f2a6ab2d5396acf4bb56aea7e49c3e2097
Component: engine
2016-12-21 13:15:00 -05:00
dd179255a2 Fix docker plugin inspect <unkown object> issue on Windows
This fix is a follow up for comment:
https://github.com/docker/docker/pull/29186/files#r91277345

While #29186 addresses the issue of `docker inspect <unknown object>`
on Windows, it actually makes `docker plugin inspect <unknown object>`
out `object not found` on Windows as well. This is actually misleading
as plugin is not supported on Windows.

This fix reverted the change in #29186 while at the same time,
checks `not supported` in `docker inspect <unknown object>` so that
- `docker plugin inspect <unknown object>` returns `not supported` on Windows
- `docker inspect <unknown object>` returns `not found` on Windows

This fix is related to #29186 and #29185.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0b3c10ac4ddfe3655bac080440a8553269f2307f
Component: engine
2016-12-20 21:05:10 -08:00
4c53abe848 Clarify what docker diff shows
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 4497801c8a35ca2be9467419c5addff5166442d0
Component: engine
2016-12-20 17:03:11 -08:00
67834a4b9f Merge pull request #29470 from cyli/ask-for-unlock-key-only-if-locked
Check if a swarm is locked before asking a user to enter their unlock key
Upstream-commit: 0d5a715931c514dd9fdc77927105bdf049411b2b
Component: engine
2016-12-20 13:21:47 -08:00
209ed6b4ef change minor mistake of spelling
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 7c3657065cc04af278a0f1cee99de8c2401ba0ef
Component: engine
2016-12-20 21:05:19 +08:00
96f73955fb Fix misleading default for --replicas
This fix tries to address the issue raised in 29291 where
the output of `--replicas` in `service create/update`:
```
      --replicas uint                    Number of tasks (default none)
```
is misleading. User might incorrectly assume the number of replicas
would be `0` (`none`) by default, while the actual default is `1`.

The issue comes from the fact that some of the default values are
from daemon and it is not possible for client to find out the default
value.

In this case, it might be better to just simply not displaying `(default none)`.

This fix returns "" for `Uint64Opt` so that `(default none)` is hidden.

In addition to `--replicas`, this fix also changes
`--restart-delay`, `--restart-max-attempts`, `--stop-grace-period`,
`--health-interval`, `--health-timeout`, and `--restart-window`
in a similiar fashion.

New Output:
```
      --health-interval duration         Time between running the check (ns|us|ms|s|m|h)
      --health-timeout duration          Maximum time to allow one check to run (ns|us|ms|s|m|h)
...
      --replicas uint                    Number of tasks
...
      --restart-delay duration           Delay between restart attempts (ns|us|ms|s|m|h)
      --restart-max-attempts uint        Maximum number of restarts before giving up
      --restart-window duration          Window used to evaluate the restart policy (ns|us|ms|s|m|h)
...
      --stop-grace-period duration       Time to wait before force killing a container (ns|us|ms|s|m|h)
```

The docs has been updated. Note the docs for help output of `service create/update`
is out of sync with the current master. This fix replace with the update-to-date
help output.

This fix fixes 29291.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: acc93db32bd0d14801db65d6cb0a0e06d7cec2f7
Component: engine
2016-12-19 19:35:05 -08:00
6c8c837c0c Merge pull request #29246 from thaJeztah/improve-swarm-check-in-inspect
Ignore certificate expiry error for top-level inspect
Upstream-commit: 77dde3efa7934959a762781ed42a64c70f49b9c2
Component: engine
2016-12-19 15:37:53 -08:00
ae0f2c64b3 Merge pull request #29339 from dmcgowan/plugins-abstract-download-manager
Abstract layerstore from pull/push distribution code
Upstream-commit: aecb79ff9866ec6b3536c50608706d2d4a6325df
Component: engine
2016-12-19 13:32:28 -08:00
c162add86f Abstract distribution interfaces from image specific types
Move configurations into a single file.
Abstract download manager in pull config.
Add supports for schema2 only and schema2 type checking.
Add interface for providing push layers.
Abstract image store to generically handle configurations.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 3c7676a057a4c0103895f793e407dc6736df139a
Component: engine
2016-12-19 10:55:00 -08:00
e43da16101 remove client-side for supported logging drivers
The `docker logs` command performed a
client-side check if the container's
logging driver was supported.

Now that we allow the client to connect
to both "older" and "newer" daemon versions,
this check is best done daemon-side.

This patch remove the check on the client
side, and leaves validation to the daemon,
which should be the source of truth.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 05dc9846e1266e6a3629c26851acb633a380dd17
Component: engine
2016-12-19 14:30:01 +01:00
2b846c8a06 Merge pull request #28629 from yongtang/28581-secret-create-input
Add `--file` flag for `docker secret create` command
Upstream-commit: 4436a5946d1cc20efb3af5a3d0c56894c02f1a29
Component: engine
2016-12-18 03:04:10 +01:00
57407d7f5e Improve error output for docker stats ...
While looking into `docker stats <c1> <c2> ...` I noticed that
the error output is quite long, especially if there are multiple errors:
```sh
ubuntu@ubuntu:~/docker$ docker stats nofound
: Error response from daemon: No such container: nofound
ubuntu@ubuntu:~/docker$ docker stats nofound foo bar
: Error response from daemon: No such container: nofound, : Error response from daemon: No such container: foo, : Error response from daemon: No such container: bar
```

There are several issues,
1. There is an extra `: ` at the beginning. That is because if container is not found,
the name will not be available from the daemon.
2. Multiple errors are concatenated with `, ` which will be quite long.

This fix:
1. Only prient out the error from daemon.
2. Multiple errors are printed out line by line.

Below is the new output:
```sh
ubuntu@ubuntu:~/docker$ docker stats nofound
Error response from daemon: No such container: nofound
ubuntu@ubuntu:~/docker$ docker stats nofound foo bar
Error response from daemon: No such container: nofound
Error response from daemon: No such container: foo
Error response from daemon: No such container: bar
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 32de162fc9a18f7f2d702ce488e73b5eca0199ce
Component: engine
2016-12-17 16:51:11 -08:00
8616ae37b9 Merge pull request #29423 from unclejack/api_cli_integ_return
return directly without ifs in remaining packages
Upstream-commit: 21210419447281863f239805ab19248733041a52
Component: engine
2016-12-17 21:30:47 +01:00
d791b713a3 Before asking a user for the unlock key when they run docker swarm unlock, actually
check to see if the node is part of a swarm, and if so, if it is unlocked first.
If neither of these are true, abort the command.

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: a6a0880a22e2b135d8a20a46b9ba34c7a9cf2f10
Component: engine
2016-12-16 17:16:55 -08:00
0b16fc446e Merge pull request #29003 from dnephin/pkg-compose-transform
Move composefile -> engine api type conversion to `cli/compose/convert`
Upstream-commit: 914a72541fecfc2e4312015befb7200dd05f4462
Component: engine
2016-12-16 23:34:41 +01:00
c9e434865c Move pkg to cli/compose/convert
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 643fd775edb0a05d649f4d484e966428eb3a6b09
Component: engine
2016-12-16 12:27:31 -05:00
930d936818 Move ConvertService to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 655e48e65309f0191bbbb8b2e9730b6976e148cd
Component: engine
2016-12-16 12:20:07 -05:00