Commit graph

30682 commits

Author SHA1 Message Date
Vincent Demeester
4ca00c09b6 Merge pull request #28199 from yongtang/11062016-service-ls-format
Add `--format` to `docker service ls`
2017-02-02 10:40:04 +01:00
Sebastiaan van Stijn
1caba6c71e Merge pull request #30660 from yongtang/02012017-man-container
Make markdown for man pages of `docker container ...` consistent
2017-02-01 23:15:12 -08:00
Sebastiaan van Stijn
32697b57c8 Merge pull request #30663 from Mashimiao/reference-cmdline-service-tfix
reference/commandline: small tfix
2017-02-01 22:23:08 -08:00
Ma Shimiao
31f63d64e3 reference/commandline: small tfix
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2017-02-02 13:54:45 +08:00
Phil Estes
f0089a85ec Merge pull request #30460 from yongtang/28176-attach-binary-frame-websocket
Use binary frame for websocket attach endpoint
2017-02-01 20:02:46 -08:00
Yong Tang
6c27237f76 Make markdown for man pages of docker container ... consistent
This fix updates the markdown for man pages of `docker container ...`
so that they are consistent. The changes are based on feedback:
https://github.com/docker/docker/pull/30645#discussion_r99020188
https://github.com/docker/docker/pull/30645#discussion_r99020304

1. Use `H2 (##)` as needed
2. Use unrpiviledged prompt (`$`) instead of (`#`)

This PR convers files under man/src/container/*.md

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-01 18:34:55 -08:00
Brian Goff
bb0a532fc2 Merge pull request #30203 from allencloud/validate-healthcheck-params-in-daemon-side
validate healthcheck params in daemon side
2017-02-01 21:19:30 -05:00
Victor Vieux
632c8dd4cf Merge pull request #30616 from thaJeztah/fix-yakkety-install
install dirmngr if needed
2017-02-01 17:21:21 -08:00
Vincent Demeester
3c64061b67 Merge pull request #29747 from xlgao-zju/break-the-for
exit collect when we get EOF
2017-02-01 22:29:18 +01:00
Alexander Morozov
dc20f2abd4 Merge pull request #28762 from cpuguy83/logger_ring_buffer
Implement optional ring buffer for container logs
2017-02-01 13:04:01 -08:00
Alexander Morozov
3138a8f9f2 Merge pull request #30643 from dnephin/fix-stack-remove-test-flake
Add missing build tag for stack tests
2017-02-01 12:31:02 -08:00
Sebastiaan van Stijn
f5263c8074
install dirmngr if needed
as of Ubuntu Yakkety, dirmngr is now in a separate
package (see https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1634464)

this patch updates the install script to install
the dirmngr package if it's not installed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-01 12:17:23 -08:00
Alexander Morozov
39f717ac89 Merge pull request #30444 from albers/completion-checkpoints
Add bash completion for `docker checkpoint`
2017-02-01 11:44:37 -08:00
Alexander Morozov
f9998c8c9f Merge pull request #30613 from mattmoor/track-elided-pulls
Add tracking to elided layer pulls.
2017-02-01 11:38:35 -08:00
Brian Goff
3f4fccb65f Use sync.Pool for logger Messages
This reduces allocs and bytes used per log entry significantly as well
as some improvement to time per log operation.

Each log driver, however, must put messages back in the pool once they
are finished with the message.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-02-01 13:52:37 -05:00
Brian Goff
054abff3b6 Implement optional ring buffer for container logs
This allows the user to set a logging mode to "blocking" (default), or
"non-blocking", which uses the ring buffer as a proxy to the real log
driver.

This allows a container to never be blocked on stdio at the cost of
dropping log messages.

Introduces 2 new log-opts that works for all drivers, `log-mode` and
`log-size`. `log-mode` takes a  value of "blocking", or "non-blocking"
I chose not to implement this as a bool since it is difficult to
determine if the mode was set to false vs just not set... especially
difficult when merging the default daemon config with the container config.
`log-size` takes a size string, e.g. `2MB`, which sets the max size
of the ring buffer. When the max size is reached, it will start
dropping log messages.

```
BenchmarkRingLoggerThroughputNoReceiver-8           	2000000000	        36.2 ns/op	 856.35 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputWithReceiverDelay0-8   	300000000	       156 ns/op	 198.48 MB/s	      32 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay1-8        	2000000000	        36.1 ns/op	 857.80 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay10-8       	1000000000	        36.2 ns/op	 856.53 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay50-8       	2000000000	        34.7 ns/op	 894.65 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay100-8      	2000000000	        35.1 ns/op	 883.91 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay300-8      	1000000000	        35.9 ns/op	 863.90 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay500-8      	2000000000	        35.8 ns/op	 866.88 MB/s	       0 B/op	       0 allocs/op
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-02-01 13:52:37 -05:00
Alexander Morozov
dc78b3a1d4 Merge pull request #29863 from ncdc/journald-logdriver-drain-one-more-time-after-follow-ends
journald logs: drain 1 more time at container exit
2017-02-01 10:30:14 -08:00
Daniel Nephin
dd1d35c269 Add missing build tag for stack tests.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-02-01 13:25:37 -05:00
Vincent Demeester
829ea91bd1 Merge pull request #30633 from vdemeester/29809-fix-network-ipam-configuration-on-master
Follow-up of 29826 Use default driver for IPAM if none
2017-02-01 17:53:49 +01:00
Yong Tang
000f0403d9 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>
2017-02-01 08:33:19 -08:00
Vincent Demeester
354bd4aadd Merge pull request #29692 from yongtang/29492-daemon-shm-size
Add daemon option `--default-shm-size`
2017-02-01 16:56:10 +01:00
Vincent Demeester
4c1b40b9d4 Merge pull request #28627 from yongtang/28624-docker-plugin-ls
Add `--filter enabled=true` for `docker plugin ls`
2017-02-01 16:52:00 +01:00
Brian Goff
f907205f5d Merge pull request #30430 from Thynix/30374-remove-kickass
Replace "kickass" in name generator with "vigorous"
2017-02-01 10:33:07 -05:00
Vincent Demeester
1b6a15eedc Merge pull request #27557 from yongtang/27178-ps-filter-publish-expose
Add `publish` and `expose` filter for `docker ps --filter`
2017-02-01 16:32:28 +01:00
Vincent Demeester
27f90acd61 Merge pull request #22563 from mlaventure/cgroup-devices
Allow adding rules to cgroup devices.allow on container create/run
2017-02-01 16:29:34 +01:00
Vincent Demeester
caa78da1c6 Merge pull request #30446 from jim-minter/attachrace
Resolve race conditions in attach API call
2017-02-01 16:20:50 +01:00
Vincent Demeester
e66717e9f8 Merge pull request #30537 from DiSiqueira/asserting_error
Underscoring an unused var in tests
2017-02-01 16:08:20 +01:00
Vincent Demeester
c322064127
Use default driver for IPAM if none
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-02-01 15:54:56 +01:00
Jim Minter
84d6240cfe Resolve race conditions in attach API call
Signed-off-by: Jim Minter <jminter@redhat.com>
2017-02-01 09:01:36 +00:00
Vincent Demeester
8f8c4f20e3 Merge pull request #30614 from Microsoft/jjh/vendorgowinio
Revendor Microsoft/go-winio v0.3.8
2017-02-01 09:52:55 +01:00
Vincent Demeester
1de72681b5 Merge pull request #30619 from johndmulhausen/patch-3
Fix for 404 in docs
2017-02-01 09:50:11 +01:00
Vincent Demeester
60f8f3fd64 Merge pull request #30615 from tiborvass/plugin_errors
plugin: use pkg/errors in more places
2017-02-01 09:44:19 +01:00
Vincent Demeester
deb0885419 Merge pull request #30620 from thaJeztah/carry-29590
some grammatical errors
2017-02-01 09:40:17 +01:00
Xinbo Weng
5b258f6ac2
some grammatical errors
Signed-off-by: Xinbo Weng <xihuanbo_0521@zju.edu.cn>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-01-31 19:33:12 -08:00
Sebastiaan van Stijn
36db5f6f68 Merge pull request #30011 from davidwilliamson/patch-1
Provide password to volume create command
2017-01-31 19:20:30 -08:00
John Mulhausen
3c3456885d Fix for https://github.com/docker/docker.github.io/issues/1413
Signed-off-by: John Mulhausen <john@docker.com>
2017-01-31 18:59:21 -08:00
Steve Dougherty
2b30a79d9e
Replace "kickass" in name generator with "vigorous"
Having curse words in container names can get awkward.

Closes #30374.

Signed-off-by: Steve Dougherty <steve@asksteved.com>
2017-01-31 21:33:23 -05:00
Victor Vieux
6365d8dd19 Merge pull request #30578 from tophj-ibm/add-p-z-to-release-deb
[ppc64le/s390x] add p/z to release-deb
2017-01-31 17:39:17 -08:00
John Howard
da6739c99f Revendor Microsoft/go-winio v0.3.8
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-01-31 16:46:59 -08:00
Tibor Vass
26d0bac895 plugin: use pkg/errors in more places
Also provide stack trace output in daemon logs.

Signed-off-by: Tibor Vass <tibor@docker.com>
2017-01-31 16:45:26 -08:00
Matt Moore
d5482089bf Add tracking to elided layer pulls.
Signed-off-by: Matt Moore <mattmoor@google.com>
2017-01-31 16:36:17 -08:00
Victor Vieux
2b412120b6 Merge pull request #30608 from mlaventure/update-containerd
Update containerd to version 78fb8f45890a601e0fd9051cf9f9f74923e950fd
2017-01-31 16:34:50 -08:00
Alexander Morozov
052f593530 Merge pull request #30607 from jroenf/patch-1
Fix syntax in label example
2017-01-31 14:55:13 -08:00
jroenf
ada374f316 Fix syntax in example
Signed-off-by: Jeroen Franse <jeroenfranse@gmail.com>
2017-01-31 23:51:06 +01:00
Kenfe-Mickael Laventure
50886f49b9 Update containerd to version 78fb8f45890a601e0fd9051cf9f9f74923e950fd
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-31 14:36:51 -08:00
Yong Tang
e82dcaab52 Use binary frame for websocket attach endpoint
This fix tries to address the issue raised in 28176 where
text frame was used in websocket attach endpoint. In case
the data send out contains non utf8 data, the connection
will be closed in certain browsers, e.g., Safari.

This fix address the issue by change `PayloadType` to `BinaryFrame`.

This fix is tested manually with Safari. The docker daemon is inside a Linux Virtual Machine.

Create a container with:
```
docker run -itd --name websocket busybox sh -c "while true; do echo -e 'he\\xc3\\x28o'; sleep 5; done"
```

Use the following url (172.16.66.128:2375 is the tcp address of the daemon):
```
file:///websocket.html?url=ws://172.16.66.128:2375/v1.25/containers/websocket/attach/ws?logs=1&stderr=1&stdout=1&stream=1&stdin=1
```

and the following html:
```
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Websocket</title>
  <script type="text/javascript">
    function DockerWebSocket() {
      if ("WebSocket" in window) {
        console.log("WebSocket is supported by Browser...")
        // Remove '?url=' prefix
        url = window.location.search.replace(/^(\?url=)/,"");
        console.log("URL ["+url+"]...");
        var ws = new WebSocket(url);
        ws.onopen = function() {
          console.log("Connection is opened...");
        };
        ws.onclose = function() {
          console.log("Connection is closed...");
        };
        ws.onmessage = function (e) {
          if (typeof e.data === "string") {
            alert("WebSocket received text message ["+e.data+"]!")
          } else {
            console.log("Message is received...")
            var blobReader = new FileReader();
            blobReader.onload = function(event) {
              console.log(JSON.stringify(blobReader.result))
            };
            blobReader.readAsText(e.data)
            console.log("Message complete...")
          }
        };
      } else {
        alert("WebSocket is not supported by Browser!");
      }
    }
  </script>
</head>
<body>
  <div>
    <a href="javascript:DockerWebSocket()">Run DockerWebSocket</a>
  </div>
</body>
</html>
```

This fix fixes 28176.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-31 14:04:32 -08:00
DiSiqueira
4bd1895241 I found out this err var isn't being used, so underscoring it to preserve resources
Signed-off-by: DiSiqueira <dieg0@live.com>
2017-01-31 19:48:15 -02:00
Alexander Morozov
ebaf1ced72 Merge pull request #27071 from rhvgoyal/docker-overlay-error
Warn if kernel does not support overlay with selinux
2017-01-31 13:41:02 -08:00
Phil Estes
feb8b1c581 Merge pull request #30506 from vdemeester/29732-follow-up-compose-indempotent
Make docker stack deploy a little bit more indempotent
2017-01-31 13:35:04 -08:00
Alexander Morozov
1d2f5de49a Merge pull request #30162 from yongtang/29972-service-read-only
Add `--read-only` for `service create` and `service update`
2017-01-31 13:20:00 -08:00