Commit Graph

38 Commits

Author SHA1 Message Date
388cfd9d1a bump engine API to 1.27
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 6bad3fc9fbcdef48b3b0b2fbb5cbaf530cc4db56
Component: engine
2017-02-08 16:14:58 -08:00
49889e6daa 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>
Upstream-commit: 9fc393615f6aae1a70ba282123ee15afc23a6297
Component: engine
2017-02-07 08:24:46 -08:00
3f7730c74a Merge pull request #30734 from allencloud/add-400-status-code-for-events-endpoint
add status code 400 for api endpoint /events
Upstream-commit: f3da980a459c11a35248daa8a6be9919bf65fda2
Component: engine
2017-02-07 17:02:50 +01:00
8b439bbd93 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
Upstream-commit: 0113128b2a79a9cef9950e71e0681380b240faf4
Component: engine
2017-02-06 11:53:17 -08:00
8dc7e39e0a add status code 400 for api endpoint /events
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 323f575087d7e2068d74598283ec485b1f115226
Component: engine
2017-02-04 13:40:24 +08:00
cbb944b4cd add status code 404 for plugin api endpoint enable and disable
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 75f73058888347261edc4668c9d65f9ca161338d
Component: engine
2017-02-03 15:13:10 +08:00
5c3503d315 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>
Upstream-commit: f388b7aa8af84e39347cde70691130c9417377b8
Component: engine
2017-02-02 20:19:58 -08:00
9447ebbb9d Merge pull request #30460 from yongtang/28176-attach-binary-frame-websocket
Use binary frame for websocket attach endpoint
Upstream-commit: f0089a85ecba6a31c6e00b038b18096080e516ea
Component: engine
2017-02-01 20:02:46 -08: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
11a6f80b8b 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>
Upstream-commit: 054abff3b67bb5d66323e5418a43c845a3eac8a1
Component: engine
2017-02-01 13:52:37 -05:00
b0eb082cb1 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>
Upstream-commit: e82dcaab520cb5676091f31d90614d3988a725e4
Component: engine
2017-01-31 14:04:32 -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
58a26ce2d7 Merge pull request #30478 from mstanleyjones/fix_broken_links
Fix broken relative links in old API docs
Upstream-commit: 05d4c1314efd6b2ce408734aeece0e73f5d278f0
Component: engine
2017-01-27 09:45:52 -08:00
41ea58b118 Fix broken relative links in old API docs
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 37b13201c41753574942e567562f7ad098b827bf
Component: engine
2017-01-26 10:15:47 -08:00
cab1925d86 update api docs on Placement.Constraints for services
Signed-off-by: Lars-Magnus Skog <ralphtheninja@riseup.net>
Upstream-commit: 9c98bffc2b92625f113b390442b6dca245cb4be5
Component: engine
2017-01-26 15:01:21 +01:00
2b0805b53f typo: fix typo in api documents
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 2f0d4946823019d2b41a0aac7eaa6b84f8e96e49
Component: engine
2017-01-23 22:05:44 -05:00
8f27f74ad0 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>
Upstream-commit: b1996728aaeaa147c2045c8be79373d59ce7117a
Component: engine
2017-01-10 06:40:06 +02:00
a688a9fc84 Attempts -> MaxAttempts in /services/create
Signed-off-by: Lars-Magnus Skog <ralphtheninja@riseup.net>
Upstream-commit: 778eeaea2089eed1f0f113bdc73f427b4e68c572
Component: engine
2017-01-09 16:04:34 +01:00
5c56c3f06a Fix typo in docs
s/BlkioDeviceWiiteIOps/BlkioDeviceWriteIOps/g

Signed-off-by: David Xia <dxia@spotify.com>
Upstream-commit: f394b1d77614d33e85c93ecb10f0a6676538b2e7
Component: engine
2016-12-25 11:48:11 -05:00
1e12b9ad9a Merge pull request #29600 from allencloud/update-docs-about-service-update
update service update in docs
Upstream-commit: 524704143b1f27650db9debe22adb9cf1e583930
Component: engine
2016-12-22 15:17:51 +01:00
1173e9c692 Merge pull request #29637 from wxb0521/bo-docker-0.5
some punctuation errors and a verb form error
Upstream-commit: 584485abca124d45e08b618e23b7cbf7b947895f
Component: engine
2016-12-21 12:18:04 -05:00
5f8f7eaafe update service update in docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: b44efead25a1d2600f0950e5e2800c17e7489a43
Component: engine
2016-12-22 00:11:08 +08:00
b238e8e00f some punctuation errors and a verb form error
Signed-off-by: Xinbo Weng <xihuanbo_0521@zju.edu.cn>
Upstream-commit: 32996d6016a9f109a44301279d52d881651790e9
Component: engine
2016-12-21 20:05:19 +08:00
c2a452db81 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>
Upstream-commit: 3dc3921c76a2d21c652ec867e42e9bbe095d91da
Component: engine
2016-12-21 18:28:52 +08:00
490fa1ab01 spell error: in other parts, they are lower-case
Signed-off-by: tim-zju <21651152@zju.edu.cn>
Upstream-commit: 4bf9e7caaa31035904529ee6305921821b5aa207
Component: engine
2016-12-19 13:05:11 +08:00
1201f538ea add missing status code 403 for services/create in docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 19654fd71ec5b9b075863f4623fdb80a955f5187
Component: engine
2016-12-10 01:54:51 +08:00
2a1f61f581 Merge pull request #29062 from erxian/refine-api-swagger.yaml-towards-image-create-status-code
refine api swagger.yaml towards image create status code
Upstream-commit: 9468d687ac924db8df95fd8d2bcbe7facafb8c2d
Component: engine
2016-12-07 22:03:54 +01:00
e148b77b83 modify URLs for bind docker in docs/api
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 9c76fb253ecc53cc54d196a4460d8e1d91c1683d
Component: engine
2016-12-07 15:06:16 +08:00
afe61e5090 refine api swagger.yaml towards image create status code
Signed-off-by: erxian <evelynhsu21@gmail.com>
Upstream-commit: 15be050fb307d0da1521767a6f53d9b95429396b
Component: engine
2016-12-07 10:27:40 +08:00
13d5eb7768 add 403 for endpoint network create
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0d21e24b9fb90ea804ba37af303de7547743ba2b
Component: engine
2016-12-06 14:36:50 +08:00
25a255f4fc add missing status code in api docs
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 9a1f7b6b0bba7bd28c5ae1fabef7ef267e5fbfbd
Component: engine
2016-12-02 11:24:45 +08:00
c2f7699391 Merge pull request #28917 from erxian/correct-secret-remove-http-return-code
correct the http return code of secret remove
Upstream-commit: 457d562af128a765b48389681399903ca0e679cf
Component: engine
2016-11-30 22:47:28 +01:00
0a639f6e9e Merge pull request #28840 from bfirsh/2016-11-25-api-docs
Updates to swagger.yaml and API documentation
Upstream-commit: 643b1c0175206291d8850a87608912d906009a71
Component: engine
2016-11-30 15:49:25 +01:00
cfe1223c49 correct the http return code of secret remove
Signed-off-by: erxian <evelynhsu21@gmail.com>
Upstream-commit: 21768933fbf61d1481e303ee7a3a5ecc57fc3838
Component: engine
2016-11-30 19:45:45 +08:00
d6a43b5d6a Fix headings in old API docs
Jekyll automatically adds titles based on the title of the page,
so this was causing duplicate titles.

Also, made all the headings the correct level.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: d9b109b807a1ea859b9d71eb22663f577b0b8c47
Component: engine
2016-11-28 11:24:22 +00:00
c1c6b75097 update the secret command docs
Signed-off-by: erxian <evelynhsu21@gmail.com>
Upstream-commit: c22821014a8d951d7028f9d2888072c4d9f7c593
Component: engine
2016-11-23 10:36:11 +08:00
e5912f7d7e Rename Remote API to Engine API
Implementation of https://github.com/docker/docker/issues/28319

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: f0d55cd081c6e8ad2a8222c787d54f9aae15723f
Component: engine
2016-11-22 12:49:38 +00:00
7e2e397a31 Move API reference to new location
See: https://github.com/docker/docker.github.io/pull/606

Also:
- Add missing redirects to API reference pages
- Remove v1.25 and 1.26, because they are being replaced with
  swagger generated docs.
- Remove all other docs which aren't reference material, because
  this can live in docker/docker.github.io

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Upstream-commit: 993854f58fa4132ff82c2e1ffe291d90b301db5a
Component: engine
2016-11-22 12:47:25 +00:00