Commit Graph

548 Commits

Author SHA1 Message Date
25f196e2c2 Merge pull request #31206 from xuzhenglun/master
fix wrong print format
Upstream-commit: 19795b934cac6f90b75f973ba59ece153c3df2cb
Component: engine
2017-02-21 14:13:32 -08:00
a8278abaf1 fix wrong print format
Signed-off-by: Reficul <xuzhenglun@gmail.com>
Upstream-commit: 9b1ceecd8a44e72ad773f7016df09a4b285258b8
Component: engine
2017-02-21 10:26:06 +08:00
301cc805aa Merge pull request #30814 from YuPengZTE/devSwarmCliExplain
fix the type
Upstream-commit: 25500d56a5f3a94456bd8172a64bf119cc36dd7f
Component: engine
2017-02-21 00:59:58 +01:00
6446421ffd add missing API changes
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: a7e6d2ca1fd30a6122a65558507135e7079ae6a7
Component: engine
2017-02-19 01:33:43 -08:00
b7f72f988d Merge pull request #28213 from yongtang/11062016-service-ps-format
Add `--format` to `docker service ps`
Upstream-commit: b1debf1374ca7be7e7b4d4fcd41eceaf8b7cf153
Component: engine
2017-02-17 10:23:18 -08:00
ffcecda259 Merge pull request #31114 from allencloud/split-compose-stack-deploy-from-deploydotgo
split compose deploy from deploy.go
Upstream-commit: f00514a1d0cb883229e8388ef0c8bd91efcca6dd
Component: engine
2017-02-17 08:48:51 -08:00
7fdc39f1fc Merge pull request #30848 from nishanttotla/suppress-digest-docker-ps
Suppressing image digest in docker ps
Upstream-commit: 40532143c2c4cf1359fd8484789b81c1f1f59d98
Component: engine
2017-02-17 10:27:49 +01:00
5f5d704cba split compose deploy from deploy.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: f46a14f7b611276256c7e8148e87c1d570201d74
Component: engine
2017-02-17 17:13:31 +08:00
000b690000 Merge pull request #31088 from xulike666/make-code-readable-again
Typo fixed and this time I provide my cSpell.json
Upstream-commit: 8e5769445211f71635432dcdba17d31f2571e52a
Component: engine
2017-02-16 22:04:27 -05:00
5361825be7 Suppressing image digest in docker ps
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: b04536f61fe9d8e9827832e0cef02cc2c5cef003
Component: engine
2017-02-16 18:11:56 -08:00
29e3dcbbb0 why there are so many mistakes in our repo (up to /cmd)
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: f8a40477960976f12dbbb72e5b133b5b0f05f9b3
Component: engine
2017-02-17 00:32:48 +08:00
492545a1db Sort docker stack ls by name
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 97d85127c231d1b0823a3459d638dbd4f0ba1460
Component: engine
2017-02-16 14:30:39 +01:00
2da555a6fc Merge pull request #29819 from vdemeester/service-validate-publish-simple-syntax
Make sure we validate simple syntax on service commands
Upstream-commit: f18bc25fa1449ececeac3f8e4691934bd07abb75
Component: engine
2017-02-15 12:31:46 -08:00
a532e48c46 fix the type
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
Upstream-commit: d735972d3150fa4e286ce468f033156fa22fddb7
Component: engine
2017-02-14 09:54:27 +08:00
96d98e23ed Merge pull request #30900 from YuPengZTE/devPublisedPort
Add "=" before the value of PublishedPort
Upstream-commit: c110abfa9f4c1ec33dc223570fad50c5f6afc00d
Component: engine
2017-02-12 21:56:43 +01:00
08e260c901 Add --format to docker service ps
This fix tries to address the issue raised in 27189 where
it is not possible to support configured formatting stored in
config.json.

Since `--format` was not supported in `docker service ps`,
the flag `--format` has also been added in this fix.

This fix
1. Add `--format` to `docker service ps`
2. Add `tasksFormat` to config.json
3. Add `--format` to `docker stack ps`
4. Add `--format` to `docker node ps`

The related docs has been updated.

An integration test has been added.

This fix fixes 27189.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f8c7c921d905615acf1d2c6577ae1cfb4600bec0
Component: engine
2017-02-10 16:53:04 -08:00
a30a294780 Add = before the value of PublishedPort
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
Upstream-commit: e9a85c59097a61f85dabe3fd059b89739636a0e7
Component: engine
2017-02-10 14:53:18 +08:00
9c4fa985c0 print 'worker' join token after swarm init
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 18adec5c89420186a2d7320db0b1e76696c9f552
Component: engine
2017-02-09 14:54:05 -08:00
466e8e21b6 Merge pull request #30776 from WeiZhang555/stats-all-format-name-panic-cli
Fix panic of "docker stats --format {{.Name}} --all"
Upstream-commit: f5116c680207a12ecd9c4fa654a1a5707e7ac89c
Component: engine
2017-02-08 11:40:06 -08:00
b520dbb06a Fix panic of "docker stats --format {{.Name}} --all"
This commit fixes panic when execute stats command:

* use --format {{.Name}} with --all when there're exited containers.
* use --format {{.Name}} while stating exited container.

The root cause is when stating an exited container, the result from the
api didn't contain the Name and ID field, which will make format
process panic.

Panic log is like this:

```
panic: runtime error: slice bounds out of range [recovered]
	panic: runtime error: slice bounds out of range

goroutine 1 [running]:
panic(0xb20f80, 0xc420014110)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
text/template.errRecover(0xc4201773e8)
	/usr/local/go/src/text/template/exec.go:140 +0x2ad
panic(0xb20f80, 0xc420014110)
	/usr/local/go/src/runtime/panic.go:458 +0x243
github.com/docker/docker/cli/command/formatter.(*containerStatsContext).Name(0xc420430160,
0x0, 0x0)
	/go/src/github.com/docker/docker/cli/command/formatter/stats.go:148
+0x86
reflect.Value.call(0xb9a3a0, 0xc420430160, 0x2213, 0xbe3657, 0x4,
0x11bc9f8, 0x0, 0x0, 0x4d75b3, 0x1198940, ...)
	/usr/local/go/src/reflect/value.go:434 +0x5c8
reflect.Value.Call(0xb9a3a0, 0xc420430160, 0x2213, 0x11bc9f8, 0x0, 0x0,
0xc420424028, 0xb, 0xb)
	/usr/local/go/src/reflect/value.go:302 +0xa4
text/template.(*state).evalCall(0xc420177368, 0xb9a3a0, 0xc420430160,
0x16, 0xb9a3a0, 0xc420430160, 0x2213, 0x1178fa0, 0xc4203ea330,
0xc4203de283, ...)
	/usr/local/go/src/text/template/exec.go:658 +0x530
```

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 5a7b3c78e06081fb2d44b6f4296cb416ab91aaff
Component: engine
2017-02-08 10:26:52 +08:00
14c3328b3b Merge pull request #30790 from vdemeester/pr-30602
Carry #30602 : Bump go-units
Upstream-commit: 31f172bdb50091be8880caac83046401bb43fc17
Component: engine
2017-02-08 11:04:22 +09:00
c355cec53c Merge pull request #30457 from dmcgowan/distribution-reference-update-2
reference: use distribution reference and remove fork
Upstream-commit: 254fc83cba90ed79c78f4cb0cb33aeeaff492798
Component: engine
2017-02-07 22:01:25 +01:00
e1911d98d5 Bump go-units
To include  https://github.com/docker/go-units/pull/23
Fixes a unit test that fails because of it.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: cb89d658dc6dca5f0efa21cac168ae82fea821d1
Component: engine
2017-02-07 21:58:56 +01:00
2260389fe6 Use distribution reference
Remove forked reference package. Use normalized named values
everywhere and familiar functions to convert back to familiar
strings for UX and storage compatibility.

Enforce that the source repository in the distribution metadata
is always a normalized string, ignore invalid values which are not.
Update distribution tests to use normalized values.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 3a1279393faf78632bf169619d407e584da84b66
Component: engine
2017-02-07 11:08:37 -08:00
0c640a030b Make sure we validate simple syntax on service commands
We ignored errors for simple syntax in `PortOpt` (missed that in the
previous migration of this code). This make sure we don't ignore
`nat.Parse` errors.

Test has been migrate too (errors are not exactly the same as before
though -_-)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: aa4ecd153b88644a53b23b7c46332d9b50007930
Component: engine
2017-02-07 12:45:47 +01:00
770410c730 Merge pull request #30749 from yongtang/28005-docker-stats-header-windows
Fix Windows `docker stats` showing Linux headers
Upstream-commit: 90709776c5a78bcfab226c19ccb6fa21c3f272f6
Component: engine
2017-02-06 14:09:23 -08:00
3b3c271a31 Fix "command.PromptForConfirmation" to accept "enter" for the "N" default
This adjusts `command.PromptForConfirmation` in `cli/command/utils.go` to use `bufio`'s `ReadLine` rather than using `fmt.Fscan` for reading input, which makes `<Enter>` properly accept the default value of "No" as one would expect.

This new code actually came from `cli/command/plugin/install.go`'s `acceptPrivileges` function, which I've also refactored here to use `command.PromptForConfirmation` as it should.

Additionally, this updates `cli/command/plugin/upgrade.go`'s `runUpgrade` function to use `command.PromptForConfirmation` for further consistency.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 2198b0568f7b7137545757c896191ef2a2bc720e
Component: engine
2017-02-06 09:13:07 -08:00
190522d7df Fix Windows docker stats showing Linux headers
This fix is an attempt to fix issue raised in #28005 where
`docker stats` on Windows shows Linux headers if there is
no containers in stats.

The reason for the issue is that, in case there is no container,
a header is faked in:
https://github.com/docker/docker/blob/v1.13.0/cli/command/formatter/formatter.go#L74-L78
which does not know OS type information (as OS was stored with container stat entries)

This fix tries to fix the issue by moving OS type information
to stats context (instead of individual container stats entry).

Additional unit tests have been added.

This fix fixes #28005.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0a3a3ba2b62a5720d949e93fd580d3cf797cfa9e
Component: engine
2017-02-05 08:55:30 -08:00
28da29ca6e 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: 03c694973968f63743ed53cef83d0b7455695081
Component: engine
2017-02-03 16:21:12 -05:00
c16190c838 Merge pull request #30180 from allencloud/add-endpoint-mode-a-default-value
add endpoint mode a default value
Upstream-commit: e07c392c49c44f5bc8986bad6378d9c5228669ce
Component: engine
2017-02-02 11:51:44 -08:00
b481e6b38d Merge pull request #28199 from yongtang/11062016-service-ls-format
Add `--format` to `docker service ls`
Upstream-commit: 4ca00c09b6ab7fb4fce0b909516e6b972f463c23
Component: engine
2017-02-02 10:40:04 +01:00
38bc957cc1 Merge pull request #30203 from allencloud/validate-healthcheck-params-in-daemon-side
validate healthcheck params in daemon side
Upstream-commit: bb0a532fc21cb6b9390fb7e5eb0054bdc8045bbc
Component: engine
2017-02-01 21:19:30 -05:00
98919fc990 Merge pull request #29747 from xlgao-zju/break-the-for
exit collect when we get EOF
Upstream-commit: 3c64061b6719e26a2a14d314d39f42e7df6ad9a4
Component: engine
2017-02-01 22:29:18 +01:00
256ff53fbd Add --format to docker service ls
This fix tries to improve the display of `docker service ls`
and adds `--format` flag to `docker service ls`.

In addition to `--format` flag, several other improvement:
1. Updates `docker stacks service`.
2. Adds `servicesFormat` to config file.

Related docs has been updated.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 000f0403d9084e8da427bafac3b594a822b3c386
Component: engine
2017-02-01 08:33:19 -08:00
ba31fcddc2 Merge pull request #29692 from yongtang/29492-daemon-shm-size
Add daemon option `--default-shm-size`
Upstream-commit: 354bd4aaddc3072dbe9ead45b22a1eaccda6a506
Component: engine
2017-02-01 16:56:10 +01:00
9655371ac7 Merge pull request #28627 from yongtang/28624-docker-plugin-ls
Add `--filter enabled=true` for `docker plugin ls`
Upstream-commit: 4c1b40b9d4a301edc5874e59edcec0f015490fec
Component: engine
2017-02-01 16:52:00 +01:00
313335dc3d Merge pull request #22563 from mlaventure/cgroup-devices
Allow adding rules to cgroup devices.allow on container create/run
Upstream-commit: 27f90acd61f4937f1f722082793e806261e527f7
Component: engine
2017-02-01 16:29:34 +01:00
cc26ad0039 Merge pull request #30162 from yongtang/29972-service-read-only
Add `--read-only` for `service create` and `service update`
Upstream-commit: 1d2f5de49aad9f35e3fc3160693a07a86998d3dc
Component: engine
2017-01-31 13:20:00 -08:00
46d59f3006 Merge pull request #30411 from thaJeztah/fix-build-from-local-github-directories
do not ignore local build-contexts starting with "github.com"
Upstream-commit: 048fc98c09fb85b827f3caf69c460e9ad6aa095a
Component: engine
2017-01-31 12:45:11 -08:00
2af5a366ad Add --read-only for service create and service update
This fix tries to address the issue raised in 29972 where
it was not possible to specify `--read-only` for `docker service create`
and `docker service update`, in order to have the container's root file
system to be read only.

This fix adds `--read-only` and update the `ReadonlyRootfs` in `HostConfig`
through `service create` and `service update`.

Related docs has been updated.

Integration test has been added.

This fix fixes 29972.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 499a0dd43e50c6f253f8890f5c54ae99675b1e7e
Component: engine
2017-01-30 12:47:26 -08:00
c74a5fc7cf Merge pull request #30186 from thaJeztah/add-version-annotation-to-flags
Add version annotation to various flags added in 1.13
Upstream-commit: a08da82a28848b4857e86b9a493143e9ac3fcee6
Component: engine
2017-01-30 12:33:36 -08:00
5c27e35fbb validate healthcheck params in daemon side
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: e399c558e6eeef519a84a2e0bb11dade5a345014
Component: engine
2017-01-29 13:35:32 +08:00
3526619d18 remove cli/command/secrets/utils.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 51b37a7983435edcd2331571bcb85b2686cbd006
Component: engine
2017-01-29 13:32:49 +08:00
bb6c1d5874 add endpoint mode a default value
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 9eacabbfb7d70f582a8c0064c38f1b62c61a4869
Component: engine
2017-01-28 20:46:34 +08:00
47697dba88 Merge pull request #29218 from yongtang/28884-secret-inspect-follow-up
Move secret name or ID prefix resolving from client to daemon
Upstream-commit: 3c32e1775a174edfc6883a7167326bc91bc2eb24
Component: engine
2017-01-27 13:31:04 -08:00
f890132120 Update opts.MemBytes to disable default, and move docker run/create/build to use opts.MemBytes
This fix made several updates:
1. Update opts.MemBytes so that default value will not show up.
   The reason is that in case a default value is decided by daemon,
   instead of client, we actually want to not show default value.
2. Move `docker run/create/build` to use opts.MemBytes for `--shm-size`
   This is to bring consistency between daemon and docker run
3. docs updates.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d1982862cacb74fb28f8103d0774960fd59a5373
Component: engine
2017-01-27 12:17:06 -08:00
b4140d991e Add daemon option --default-shm-size
This fix fixes issue raised in 29492 where it was not
possible to specify a default `--default-shm-size` in daemon
configuration for each `docker run``.

The flag `--default-shm-size` which is reloadable, has been
added to the daemon configuation.
Related docs has been updated.

This fix fixes 29492.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: db575ef626e8b2660750cbede6b19e951a3b4341
Component: engine
2017-01-27 12:17:06 -08:00
754408c859 Move secret name or ID prefix resolving from client to daemon
This fix is a follow up for comment:
https://github.com/docker/docker/pull/28896#issuecomment-265392703

Currently secret name or ID prefix resolving is done at the client
side, which means different behavior of API and CMD.

This fix moves the resolving from client to daemon, with exactly the
same rule:
- Full ID
- Full Name
- Partial ID (prefix)

All existing tests should pass.

This fix is related to #288896, #28884 and may be related to #29125.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: fa358a87571f9212f91d8fde6696926d76ecca64
Component: engine
2017-01-27 10:40:05 -08:00
7e2571b991 Add [OPTIONS] to usage of plugin disable|push
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: aad095f573e99b69366f46d6da5bc6536f4237f1
Component: engine
2017-01-27 16:17:02 +01:00
947241845a 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: a66e0dc349dad2d45685846a95fe1d6da967a46d
Component: engine
2017-01-26 13:16:11 -08:00