Commit Graph

35 Commits

Author SHA1 Message Date
Victor Vieux cc7acf92e7 fix status code when container found on unhealthy node
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-01-04 17:24:10 -08:00
Victor Vieux 4b33656bb4 return proper error for inspect and proxy on unhealthy node
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-12-10 20:05:17 -08:00
Brian Goff c57c8a329e Ensure CloseWrite is called for hijacked TLS conns
Golang's `*tls.Conn` does not support `CloseWrite`, this means that
connections using TLS will not be able to properly close on hijacked
connections.

This copies Go's tls.Dial and instead returns an internal
`tlsClientConn` type that does store the raw net.Conn and implements
`CloseWrite`.
Implementation is mostly copied from
`github.com/docker/docker/api/client/hijack.go`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-12-03 22:48:28 -05:00
Xian Chaobo bea12ab8ab add support do with image digest
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-11-11 12:11:08 +08:00
Chanwit Kaewkasi 894d1abd63 Merge pull request #1308 from pdevine/errorstrs
Add error messages when pulling/loading images
2015-10-17 07:42:39 +07:00
Patrick Devine fe73803861 Add error messages when pulling/loading images
This change adds error strings when there is an error while pulling or
loading an image.

Signed-off-by: Patrick Devine <patrick.devine@docker.com>
2015-10-16 14:58:07 -07:00
Brian Goff d7cb8baf09 Fix issue where conn is stuck waiting for stdin
This was hard to repro, but found out it seems to only happen with TLS
connections.
When `docker run -i` was set, the client gets stuck waiting for sdin on
exit, and requires hitting return twice.

This fix ensures that:
1. When stdin is done, wait for stdout always
2. When stdout is done, close the stream and wait for stdin to finish

On 2, stdin copy should return immediately now since the out stream is closed.
Note that we probably don't actually even need to wait here.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-10-16 15:16:25 -04:00
Xian Chaobo a10a39c462 fix pull return code
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-09-10 04:10:28 -04:00
Andrea Luzzardi 3bb4373f9f Merge pull request #1111 from vieux/no_json_manual
do not generate JSON by hand
2015-08-04 15:30:30 -07:00
Xian Chaobo a3cf5b9e9c improve build
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-08-04 02:45:06 -04:00
Victor Vieux 7ec33a81b5 do not generate JSON by hand
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-07-30 18:10:13 -07:00
Andrea Luzzardi a3950e7f65 Merge pull request #796 from jimmyxian/refresh-container
Add Refresh container
2015-05-21 18:30:47 -07:00
Xian Chaobo 24eb0adbb0 fix #810 bool value
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-19 04:01:41 -04:00
Xian Chaobo 014947daad refresh before closing the connection
Signed-off-by: Xian Chaobo <xianchaobo@huawei.com>
2015-05-18 04:52:37 -04:00
Andrea Luzzardi dde47ee650 swarm IDs: Convert Swarm ID to Container ID in API Proxy.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-05-11 16:56:08 -07:00
Victor Vieux 05b01c7b43 forcerefresh after build and add test
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-04-16 12:22:09 -07:00
Andrea Luzzardi 88801da7f4 API: Move the httpError helper into helpers.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-04-15 18:02:15 -07:00
Victor Vieux e075c8fd46 remove proxyContainerAndForceRefresh
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-03-02 17:11:09 -08:00
Victor Vieux 7401789862 closeIdleConnections to prevent leaks with https
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-10 01:32:16 +00:00
Pierre Wacrenier 16f5945439 Fix race condition on exec
Signed-off-by: Pierre Wacrenier <pierre.wacrenier@gmail.com>
2015-02-05 01:40:40 +01:00
Victor Vieux c966030832 add missing close in proxy
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-02-02 22:49:05 +00:00
Victor Vieux 231ded20e0 improve some logs
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-26 23:41:56 +00:00
Andrea Luzzardi c2d527c9c6 Merge pull request #269 from vieux/add_stats
add docker stats support
2015-01-21 17:31:04 -08:00
Victor Vieux 2e968d7800 add support for history, inspect for images and improve inspect for containers
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-22 00:49:02 +00:00
Victor Vieux adad1f0f75 add docker stats support
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-21 23:28:41 +00:00
Victor Vieux a0901ce8d6 remove useless print
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-17 01:24:31 +00:00
Victor Vieux 93d63a3fea add search and login
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-15 19:19:09 +00:00
Victor Vieux 32c135314d fix headers
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-15 00:59:38 +00:00
Victor Vieux a0f3f3440b fix inspect
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-14 22:33:24 +00:00
Victor Vieux 0885c7b5b8 fix tls in proxy func
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-13 22:02:09 +00:00
Andrea Luzzardi 94cf009e46 Container: Make Node public instead of exposing it through Node().
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2015-01-12 08:14:11 -08:00
Victor Vieux 20018ff141 add tls to hijack as well
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-07 01:56:45 +00:00
Victor Vieux 6552c7c884 fix proxy function with TLS
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-07 01:55:56 +00:00
Victor Vieux aefe450036 add exec support
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-31 00:19:13 +00:00
Victor Vieux 7aad288ba4 refactor code for exec coming later
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-12-30 19:34:20 +00:00