Commit graph

56 commits

Author SHA1 Message Date
Vincent Demeester
aad95ccba9
Merge pull request #31749 from yallop/docs-31047
Add documentation for bind mount consistency flags (#31047).
(cherry picked from commit 94394026a8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-04-03 16:33:41 +02:00
Victor Vieux
cec9594947 Merge pull request #31790 from mlaventure/devicecgrouprules-api-swagger
Update swagger.yaml and api/version-history.md for DeviceCgrouprules
2017-03-14 16:51:09 -07:00
Victor Vieux
cd173a6030 bump API to 1.28
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-14 09:32:50 -07:00
Kenfe-Mickael Laventure
6e97f11df9 Update swagger.yaml and api/version-history.md for DeviceCgrouprules
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-03-14 07:24:29 -07:00
Madhu Venugopal
cdf66ba715 Merge pull request #31710 from sanimej/drillerrr
Add verbose flag to network inspect to show all services & tasks in swarm mode
2017-03-13 21:12:32 -07:00
Santhosh Manohar
14f76a21db Enhance network inspect to show all tasks, local & non-local, in swarm mode
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-03-13 17:52:08 -07:00
Ian Campbell
115f91d757 Correct CPU usage calculation in presence of offline CPUs and newer Linux
In https://github.com/torvalds/linux/commit/5ca3726 (released in v4.7-rc1) the
content of the `cpuacct.usage_percpu` file in sysfs was changed to include both
online and offline cpus. This broke the arithmetic in the stats helpers used by
`docker stats`, since it was using the length of the PerCPUUsage array as a
proxy for the number of online CPUs.

Add current number of online CPUs to types.StatsJSON and use it in the
calculation.

Keep a fallback to `len(v.CPUStats.CPUUsage.PercpuUsage)` so this code
continues to work when talking to an older daemon. An old client talking to a
new daemon will ignore the new field and behave as before.

Fixes #28941.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-10 10:24:33 +00:00
Aaron Lehmann
3a88a24d23 Add support for rollback flags
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-03-03 16:33:34 -08:00
Aaron Lehmann
cc9d04647a Add support for the "rollback" failure action
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-03-03 16:33:34 -08:00
Sebastiaan van Stijn
e1da516598 Merge pull request #30265 from allencloud/add-CheckDuplicate-details-and-logic
add CheckDuplicate docs and logics in network
2017-03-03 14:18:52 +01:00
Sebastiaan van Stijn
a64ea37753 Merge pull request #30383 from TDAbboud/30096-add-host-docker-build
Add --add-host for docker build
2017-02-27 12:42:18 +01:00
Sebastiaan van Stijn
25500d56a5 Merge pull request #30814 from YuPengZTE/devSwarmCliExplain
fix the type
2017-02-21 00:59:58 +01:00
Tony Abboud
7a962e4577 Add --add-host for docker build
Signed-off-by: Tony Abboud <tdabboud@hotmail.com>
2017-02-20 17:32:28 -05:00
Sebastiaan van Stijn
b89aff1afa Merge pull request #30898 from allencloud/add-link-query-in-container-rm-api-doc
add link query in container rm api doc
2017-02-18 09:53:51 -08:00
Yong Tang
097b38c15d Update version-history.md for ReadOnly parameter
This fix updates the `docs/api/version-history.md`
for `ReadOnly` parameter, which is now available in
`POST /services/create` and `POST /services/(id or name)/update`.

This fix is a follow up to 30162.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-17 19:18:37 -08:00
yupengzte
d735972d31 fix the type
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-02-14 09:54:27 +08:00
allencloud
94b880f919 add CheckDuplicate docs and logics in network
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-13 00:34:40 +08:00
allencloud
2972b99f1b add link query in container rm api doc
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-11 00:17:37 +08:00
Victor Vieux
6bad3fc9fb bump engine API to 1.27
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-08 16:14:58 -08:00
Yong Tang
9fc393615f Update API history and man page for --filter expose/publish
This fix updates API history and man page for
`docker ps --filter expose/publish`, from the feedback:
https://github.com/docker/docker/pull/27557#issuecomment-276832876

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-07 08:24:46 -08:00
Vincent Demeester
f3da980a45 Merge pull request #30734 from allencloud/add-400-status-code-for-events-endpoint
add status code 400 for api endpoint /events
2017-02-07 17:02:50 +01:00
Anusha Ragunathan
0113128b2a Merge pull request #30701 from allencloud/add-status-code-404-for-plugin-in-api-doc
add status code 404 for plugin api endpoint enable and disable
2017-02-06 11:53:17 -08:00
allencloud
323f575087 add status code 400 for api endpoint /events
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-04 13:40:24 +08:00
allencloud
75f7305888 add status code 404 for plugin api endpoint enable and disable
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-02-03 15:13:10 +08:00
Madhu Venugopal
f388b7aa8a List Networks need not pull all the endpoints
Pulling all the endpoints is a very resource heavy operation especially
for Global-scoped networks with a backing KVStore. Such heavy operations
can be fetched for individual network inspect. These are unneccessary
for a simple network list operation.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-02-02 20:19:58 -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
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
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
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
allencloud
e399c558e6 validate healthcheck params in daemon side
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-01-29 13:35:32 +08:00
Misty Stanley-Jones
05d4c1314e Merge pull request #30478 from mstanleyjones/fix_broken_links
Fix broken relative links in old API docs
2017-01-27 09:45:52 -08:00
Misty Stanley-Jones
37b13201c4 Fix broken relative links in old API docs
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
2017-01-26 10:15:47 -08:00
Lars-Magnus Skog
9c98bffc2b update api docs on Placement.Constraints for services
Signed-off-by: Lars-Magnus Skog <ralphtheninja@riseup.net>
2017-01-26 15:01:21 +01:00
Lei Jitang
2f0d494682 typo: fix typo in api documents
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-01-23 22:05:44 -05:00
Boaz Shuster
b1996728aa Update docs and code to use application/x-tar in the build API
At the "Build image from Dockerfile" section in the API docs
the Content-Type header is missing.
In addition, some parts in the code are still setting the
Content-Type header to application/tar while it was changed
to application/x-tar since 16th September 2015.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-01-10 06:40:06 +02:00
Lars-Magnus Skog
778eeaea20 Attempts -> MaxAttempts in /services/create
Signed-off-by: Lars-Magnus Skog <ralphtheninja@riseup.net>
2017-01-09 16:04:34 +01:00
David Xia
f394b1d776
Fix typo in docs
s/BlkioDeviceWiiteIOps/BlkioDeviceWriteIOps/g

Signed-off-by: David Xia <dxia@spotify.com>
2016-12-25 11:48:11 -05:00
Vincent Demeester
524704143b Merge pull request #29600 from allencloud/update-docs-about-service-update
update service update in docs
2016-12-22 15:17:51 +01:00
Brian Goff
584485abca Merge pull request #29637 from wxb0521/bo-docker-0.5
some punctuation errors and a verb form error
2016-12-21 12:18:04 -05:00
allencloud
b44efead25 update service update in docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-22 00:11:08 +08:00
Xinbo Weng
32996d6016 some punctuation errors and a verb form error
Signed-off-by: Xinbo Weng <xihuanbo_0521@zju.edu.cn>
2016-12-21 20:05:19 +08:00
Anran Qiao
3dc3921c76
Fix document typos
Change the `State` field of the `/containers/json` remote API response to lowercase.
This change involves docs/api/v1.23.md and docs/api/v1.24.md

Signed-off-by: Anran Qiao <anran.qiao@daocloud.io>
2016-12-21 18:28:52 +08:00
tim-zju
4bf9e7caaa spell error: in other parts, they are lower-case
Signed-off-by: tim-zju <21651152@zju.edu.cn>
2016-12-19 13:05:11 +08:00
allencloud
19654fd71e add missing status code 403 for services/create in docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-10 01:54:51 +08:00
Vincent Demeester
9468d687ac Merge pull request #29062 from erxian/refine-api-swagger.yaml-towards-image-create-status-code
refine api swagger.yaml towards image create status code
2016-12-07 22:03:54 +01:00
lixiaobing10051267
9c76fb253e modify URLs for bind docker in docs/api
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2016-12-07 15:06:16 +08:00
erxian
15be050fb3 refine api swagger.yaml towards image create status code
Signed-off-by: erxian <evelynhsu21@gmail.com>
2016-12-07 10:27:40 +08:00
allencloud
0d21e24b9f add 403 for endpoint network create
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-06 14:36:50 +08:00
allencloud
9a1f7b6b0b add missing status code in api docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-02 11:24:45 +08:00
Sebastiaan van Stijn
457d562af1 Merge pull request #28917 from erxian/correct-secret-remove-http-return-code
correct the http return code of secret remove
2016-11-30 22:47:28 +01:00