Commit Graph

45 Commits

Author SHA1 Message Date
02aa86f034 Swap width/height in GetWinsize and monitorTtySize
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: 6e44246fed43341938a41c6db9b115e1e64d332a
Component: engine
2015-04-06 14:31:42 -07:00
471b420e47 Merge pull request #11843 from ahmetalpbalkan/win-cli/monitorttysize
windows: monitorTtySize correctly by polling
Upstream-commit: ddbc68f564156818b068c6b1b8b3ce61edfaad43
Component: engine
2015-03-31 11:14:04 -04:00
73e4fc1db9 windows: monitorTtySize correctly by polling
This change makes `monitorTtySize` work correctly on windows by polling
into win32 API to get terminal size (because there's no SIGWINCH on
windows) and send it to the engine over Remove API properly.

Average getttysize syscall takes around 30-40 ms on an average windows
machine as far as I can tell, therefore in a `for` loop, checking every
250ms if size has changed or not.

I'm not sure if there's a better way to do it on windows, if so,
somebody please send a link 'cause I could not find.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
Upstream-commit: ebbceea8a79766b7624dd7970a79054ecf582b6d
Component: engine
2015-03-26 16:08:05 -07:00
e5b36a723c Replace aliased imports of logrus, fixes #11762
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 6f4d847046cb4e072de61d042c0266190d73a8c9
Component: engine
2015-03-26 23:22:04 +01:00
04f472f007 Fix for issue 9922: private registry search with auth returns 401
Signed-off-by: Don Kjer <don.kjer@gmail.com>
Upstream-commit: 6b2eeaf8965bac07022752c411b1f8a0f35f9571
Component: engine
2015-03-26 18:59:16 +00:00
137e45c97e Merge pull request #11786 from peggyl/golint-api-client
Fix golint errors for casing in api/client package
Upstream-commit: b9d19fdaef68681186411a8ab2024211dda409d6
Component: engine
2015-03-26 09:28:33 -07:00
738874a52d Fix golint errors for casing in api/client package
Signed-off-by: Peggy Li <peggyli.224@gmail.com>
Upstream-commit: a465e26bb05083c247ba74e1092338c43c76be47
Component: engine
2015-03-25 19:54:29 -07:00
0ee1e9f604 Fixes hacks from progressreader refactor
related to #10959

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
Upstream-commit: 0cd6c05d8112e9246b734107d54e2855e3d5fec5
Component: engine
2015-03-25 18:21:02 -07:00
f634216d52 Removing -X flag option and autogenerated code to create Dockerversion.go functionality
Addresses #9207

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 6871b9b16afe46e7566ac2937246b4a64be97269
Component: engine
2015-02-20 05:40:12 +00:00
9665ff2e03 Fix range for go 1.3
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: cd5902fc7bb0da36fedb6ff6a1bb8ef200b212d9
Component: engine
2015-01-12 11:49:52 -08:00
677c67311a Use the official mime type that exists instead of an imaginary one that does not.
Signed-off-by: Jean-Paul Calderone <exarkun@twistedmatrix.com>

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@linux.com> (github: jfrazelle)
Upstream-commit: f29ee870512e8809bfc396c1771fd74235c9de7b
Component: engine
2015-01-09 20:24:54 -08:00
2ef483a8f2 Fix silly little syntax mistake
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 6292354dc359a6d8f47b3199284147d557d2c697
Component: engine
2015-01-09 15:03:11 -07:00
a1663344f6 Add "gofmt" from Go 1.3.3
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: b20363c4c056bebe256f0d53283ca1e537ed5cf6
Component: engine
2015-01-09 09:54:58 -07:00
a6dde9956d Adding workaround to suppress gofmt issues with api/client/utils.go
Signed-off-by: Don Kjer <don.kjer@gmail.com>
Upstream-commit: 33b931e718b89fec64705471534f8df3d5e42c4c
Component: engine
2015-01-08 21:16:43 +00:00
5aa04a56fb Deprecating ResolveRepositoryName
Passing RepositoryInfo to ResolveAuthConfig, pullRepository, and pushRepository

Moving --registry-mirror configuration to registry config

Created resolve_repository job

Repo names with 'index.docker.io' or 'docker.io' are now synonymous with omitting an index name.

Adding test for RepositoryInfo

Adding tests for opts.StringSetOpts and registry.ValidateMirror

Fixing search term use of repoInfo

Adding integration tests for registry mirror configuration

Normalizing LookupImage image name to match LocalName parsing rules

Normalizing repository LocalName to avoid multiple references to an official image

Removing errorOut use in tests

Removing TODO comment

gofmt changes

golint comments cleanup.  renaming RegistryOptions => registry.Options, and RegistryServiceConfig => registry.ServiceConfig

Splitting out builtins.Registry and registry.NewService calls

Stray whitespace cleanup

Moving integration tests for Mirrors and InsecureRegistries into TestNewIndexInfo unit test

Factoring out ValidateRepositoryName from NewRepositoryInfo

Removing unused IndexServerURL

Allowing json marshaling of ServiceConfig.  Exposing ServiceConfig in /info

Switching to CamelCase for json marshaling

PR cleanup; removing 'Is' prefix from boolean members.  Removing unneeded json tags.

Removing non-cleanup related fix for 'localhost:[port]' in splitReposName

Merge fixes for gh9735

Fixing integration test

Reapplying #9754

Adding comment on config.IndexConfigs use from isSecureIndex

Remove unused error return value from isSecureIndex

Signed-off-by: Don Kjer <don.kjer@gmail.com>

Adding back comment in isSecureIndex

Signed-off-by: Don Kjer <don.kjer@gmail.com>
Upstream-commit: 568f86eb186731b907b659e4ec64bda21c2fe31d
Component: engine
2015-01-08 20:14:58 +00:00
c28ef478d3 Add support for docker exec to return cmd exitStatus
Note - only support the non-detached mode of exec right now.
Another PR will add -d support.

Closes #8703

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 90928eb1140fc0394e2a79d5e9a91dbc0f02484c
Component: engine
2014-11-25 17:49:25 -08:00
1b2e957b5a Fix steam where it should be stream.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 7fe8d0aeeb373a0fef92758819d8054fbd744ea5
Component: engine
2014-11-18 10:49:01 -08:00
2e7196248a Extract client signals to pkg/signal
SIGCHLD and SIGWINCH used in api/client (cli code) are not
available on Windows. Extracting into separate files with build
tags.

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Upstream-commit: 91a86670aac52d916c81a818aff3dfcf445da83e
Component: engine
2014-11-14 18:20:53 -08:00
ab8d055502 Merge pull request #8345 from duglin/Issue5184
Add a better error message when we get an unknown http issue
Upstream-commit: b79211f4ae0f08975d02c5d51bb482f965d60a88
Component: engine
2014-11-04 20:07:41 -05:00
1a2c21becb Add a better error message when we get an unknown http issue
Closes #5184

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 6fdaa66652d65558d8225d58f3ac48904ebac1de
Component: engine
2014-11-04 16:46:41 -08:00
2d56e3cbc6 Use logrus everywhere for logging
Fixed #8761

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 7c62cee51edc91634046b4faa6c6f1841cd53ec1
Component: engine
2014-10-24 15:03:06 -07:00
7389bf879d client: even cleaner use of Transport
First off, sorry for the noise. This is a cleaner step of #8508

Found more of a root cause of the open file handles.
After more testing I found that the open file descriptors will still
occur for TCP:// connections to the daemon, causing client and/or daemon
to fail.

The issue was instantiating a new http.Transport on _ever_ client
request. So each instance held the prior connection alive, but was only
ever used once.

By moving it out to the initilization of DockerCli, we can now have
reuse of idled connections. Simplifies the garbage overhead of the
client too, though that's not usually a deal.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: da42ae536cf86dafbdad88901b9322ea7317f154
Component: engine
2014-10-12 22:32:55 -04:00
7a3f244d2c Merge pull request #8508 from vbatts/vbatts-too_many_open_files
cleaner handling of client socket access
Upstream-commit: 7fa7c42ce2f151d438ad83fd2dcd5a0679015618
Component: engine
2014-10-11 11:16:23 +03:00
abbb3a3dd3 cleaner handling of client socket access
In the go stdlib net/http Transport, the used connections are cached
when idled. This behaviour is intended for TCP connections and does not
behave correctly for unix sockets. Despite the
DefaultMaxIdleConnsPerHost being 2, the idled connections are held open
during a session. For large sessions like `docker rm $(docker ps -a -q)`
of thousands of containers, it will cause the client _and_ the server to
open too many fails and have failures.

Having keep alives not used for only unix sockets is a work around for
this stdlib issue.

Also this includes disabling compression when communicating over the
local unix socket too.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: fb7ceeb170447cdbef3e74a92358eb9b084c0bf7
Component: engine
2014-10-10 19:58:49 -04:00
3b7c4216ab Revert "Fix line delimited JSON response"
This reverts commit d2f75a3040e72562ffa825d5c3efa7004af2640a.

Conflicts:
	integration-cli/docker_api_events_test.go

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: b66ac6a80990d382a3859cd5ca8c53f038bdc1ff
Component: engine
2014-10-09 13:46:21 -07:00
ffd31097c3 Revert "Change content-type for json stream to application/x-json-stream."
This reverts commit 10ab2089ce189d5bea3f7aaac3b5081471309478.

Conflicts:
	api/client/utils.go
	docs/sources/reference/api/docker_remote_api.md

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 4c6b7cd1b560c72f2c79c28f77644f05b3ee657e
Component: engine
2014-10-09 13:17:47 -07:00
4d3be83da7 Fix Host header on stream commands
Fixes #8407

Setting Host on URL only works if the Request does not
already have its Host property set.

Note that the API version was also swallowed.

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
Upstream-commit: e457b21db32359af085b04b5900ca6aab993ac86
Component: engine
2014-10-06 17:04:27 +03:00
e3880837c4 DockerCli: Check IsTerminal() for both STDIN and STDOUT
`docker events > /tmp/out` should not print control
characters to non-terminal STDOUT.

This addresses commit 26b4a4920adca614f6be17a96f254f331271faf0
without creating regression described in issue #6509.

Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
Upstream-commit: d742c57f534352b6cad596d0c9fe8cf84044e92a
Component: engine
2014-09-25 20:58:24 +02:00
7b47b2e708 Change content-type for json stream to application/x-json-stream.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 10ab2089ce189d5bea3f7aaac3b5081471309478
Component: engine
2014-09-22 10:29:56 -07:00
ba4bc005be move stdcopy to pkg/stdcopy
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 1f03e60c2a96a92acae0e4d2fd604ab2c6d55473
Component: engine
2014-09-17 18:06:17 +03:00
9c843f0293 Merge pull request #8035 from duglin/Issue7965
Add timeout to client - fix for #7965
Upstream-commit: eb21197c6b4981db3cc2ad95694f92d723d34e2f
Component: engine
2014-09-17 01:55:48 +04:00
8b57e6f159 Adding docker exec support in CLI.
Fixed a bug in daemon that resulted in accessing of a closed pipe.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: c786a8ee5e9db8f5f609cf8721bd1e1513fb0043
Component: engine
2014-09-16 19:24:25 +00:00
fa164d03f1 Add a timeout when trying to connect to the server, otherwise sometimes it just hangs
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: f013aa7f96d7fc818f06f5b7fe0bbd20ff2d3294
Component: engine
2014-09-15 17:30:38 -07:00
40a1e3c634 Address review comments.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 669561c2aa8966f9327eca4304a06168bcf5bc49
Component: engine
2014-09-15 17:00:00 +00:00
a9173e0a9b Adding 'exec' command to remote API and CLI.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 985d57958675ee11e23070e009605c8968d547cf
Component: engine
2014-09-15 16:59:03 +00:00
4737f7cea5 Extract log utils into pkg/log
Docker-DCO-1.1-Signed-off-by: Josiah Kiehl <josiah@capoferro.net> (github: capoferro)
Upstream-commit: a02f67be5b17da63d475e6f35956c1e72c3b2e7b
Component: engine
2014-08-13 15:18:15 -07:00
6ae4c9014c update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: b3ee9ac74e171e00f14027e39278013629e681b8
Component: engine
2014-07-24 22:19:50 +00:00
1c06016fa3 adding a little uniqueness, to wrapped errors.
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 4902f047d3c6c37138a51bee05a3a48552619884
Component: engine
2014-06-17 16:07:34 -04:00
5f73b1bc4e Remove the API container struct and use env
This change touches docker logs, attach, and start -a along with get
exit code in the client.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 91757eaeb3523679b30afee61c1dede33c8664c9
Component: engine
2014-06-04 15:37:49 -07:00
1095c42f89 fix https
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 45be6f6dff1a8be328e5ade008aae8f9062f5cef
Component: engine
2014-05-02 19:49:12 +00:00
69ddc0b4e4 move hijack to it's own file
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 8c9192cd76ad46bda3d0ec5ba7eb4a30669afb40
Component: engine
2014-05-02 17:45:58 +00:00
58cd3a6a1e remove when httputil.NewClientConn when not in hijack
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 314bd02d2ccd7ab59b67d02a53669028695dd3bc
Component: engine
2014-05-02 00:25:10 +00:00
6a260a1e42 Timestamps for docker logs.
Fixes #1165
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: d1297feef8b124e69efc99a58294f498ecb8c022
Component: engine
2014-05-01 20:40:36 +04:00
e50dea8a4b apply Reduce error level form harmless errors
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 7697aad7b0537dade1d598cca5b7b1b420fa47c9
Component: engine
2014-03-31 18:11:53 +00:00
3772f57532 split client in 2 files
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: ae9ed84fdab4db5cec663bbd2d4ba8bcad897dcc
Component: engine
2014-03-31 18:11:53 +00:00