Commit Graph

270 Commits

Author SHA1 Message Date
4f33349d30 Wrap response error for container logs method.
Signed-off-by: Emil Davtyan <emil2k@gmail.com>
Upstream-commit: 2d6fb87ca41c52b255e874be62f2a3c2181a7639
Component: engine
2018-01-12 16:43:51 +01:00
844b65b181 Update doc for CopyFromContainer
This fix updates doc for CopyFromContainer to explicitly
mention that the content received from the reader is
a TAR archive.

This fix closes 35965.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e330e7a5ce77736c76c36ba77983accfae01c405
Component: engine
2018-01-08 18:29:59 +00:00
5de35938b7 Merge pull request #32914 from jamiehannaford/until-logging
Add --until flag for docker logs; closes #32807
Upstream-commit: 68a4552529c2eafb7093dc2bc25e7fc243bf363f
Component: engine
2017-11-03 16:08:30 +01:00
eefbd135ae Remove solaris build tag and `contrib/mkimage/solaris
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4785f1a7ab7ec857dc3ca849ee6ecadf519ef30e
Component: engine
2017-11-02 00:01:46 +00:00
fb29de3583 Add --until flag for docker logs; closes #32807
Signed-off-by: Jamie Hannaford <jamie.hannaford@rackspace.com>
Upstream-commit: e8d9a61f4c9e1f3cfdf1c889c541c9dc72a4bb40
Component: engine
2017-11-01 10:08:49 +01:00
4d03b3fd97 Merge pull request #35128 from thaJeztah/fix-ContainerExecAttach-type
Use correct type for ContainerExecAttach
Upstream-commit: 8b24d2a96024d7aa35a26744ea7c7df577accc4b
Component: engine
2017-10-10 10:59:16 -07:00
016304f346 Use correct type for ContainerExecAttach
ContainerExecAttach used `types.ExecConfig` instead of `types.ExecStartCheck`,
which is the type that's expected by the `/exec/execid/start` API endpoint.

Investigating when this inconsistency was introduced, I found that the client has
sent the additional properties since its first imlpementation in
c786a8ee5e9db8f5f609cf8721bd1e1513fb0043.

The `postContainerExecStart()` at that time used the "jobs" package, which
only took the information from the body that was needed (`Detach` and `Tty`).

Commit 24425021d26f29a475702064181e6c99fb6bd1c5 refactored the Exec commands
to remove the "jobs", and introduced the `ExecStartCheck` type, but failed to
update the `cli.hijack()` call with the new type.

The change in this patch should not affect compatibility with older clients,
as the additional information from the `ExecConfig` type is not used (the
API server already decodes to the `ExecStartCheck` type).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5fee8bddfeb9b268f3e0b3c91e0932ee9a5eff83
Component: engine
2017-10-09 01:25:46 +02:00
3d973055bf LCOW: API change JSON header to string POST parameter
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d98ecf2d6cdad7dae65868398440cfdc855e5263
Component: engine
2017-10-06 15:26:48 -07:00
35db73fa01 LCOW: API: Add platform to /images/create and /build
Signed-off-by: John Howard <jhoward@microsoft.com>

This PR has the API changes described in https://github.com/moby/moby/issues/34617.
Specifically, it adds an HTTP header "X-Requested-Platform" which is a JSON-encoded
OCI Image-spec `Platform` structure.

In addition, it renames (almost all) uses of a string variable platform (and associated)
methods/functions to os. This makes it much clearer to disambiguate with the swarm
"platform" which is really os/arch. This is a stepping stone to getting the daemon towards
fully multi-platform/arch-aware, and makes it clear when "operating system" is being
referred to rather than "platform" which is misleadingly used - sometimes in the swarm
meaning, but more often as just the operating system.
Upstream-commit: 0380fbff37922cadf294851b1546f4c212c7f364
Component: engine
2017-10-06 11:44:18 -07:00
72747182f4 Remove deprecated IsErr...NotFound() functions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7553fc4bcd80d103096f2e8f662b7fb3c65b5249
Component: engine
2017-10-03 12:07:49 +02:00
886e433681 Replace uses of deprecated IsErr...Notfound()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 919726b5dbf7f063f82eac2f5384966fc7271710
Component: engine
2017-10-03 12:05:03 +02:00
747a47b477 Fix version comparison when negotiating the the API version
Signed-off-by: Yu-Ju Hong <yjhong@google.com>
Upstream-commit: 4b6ec10b07c14e7fff1cc51156b6d954147f826f
Component: engine
2017-09-27 18:42:02 -07:00
5dbfedf3f9 Replace uses of filters.ToParam(), FromParam() with filters.ToJSON(), FromJSON()
`filters.ToParam()` and `filters.FromParam()` were deprecated in favor of
`filters.ToJSON()` and `filters.FromJSON()` in 065118390a3ecaf0dbd2fa752d54d43f8f1e8ec6,
but still used in various locations.

This patch replaces uses of `filters.ToParam()` and  `filters.FromParam()` with
`filters.ToJSON()` and `filters.FromJSON()`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a4efe66cf2a7648dbcf5b9993bf351925b905b5b
Component: engine
2017-09-26 13:59:45 +02:00
e38ecccceb Match not implemented error check to others
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 7406088853b6cbcb8996c367062cee2e1ee6eaaa
Component: engine
2017-09-25 13:58:51 +02:00
20c1a2b928 Handle plugin list not implemented
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: e7e11bdd44878d28c642d72761aa41eb9ffce3d1
Component: engine
2017-09-20 19:48:33 +02:00
93617a3f74 Merge pull request #34784 from dnephin/fix-client-not-found
Cleanup client not found errors
Upstream-commit: bb0e8ee51c8940c3ce23e4f594068612203c6139
Component: engine
2017-09-14 12:04:56 +02:00
18c29c5c5f Add gosimple linter
Update gometalinter

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f7f101d57ef8cbf2d8723a18b7d723c5c5dd04b6
Component: engine
2017-09-12 12:09:59 -04:00
ee7b60968b Cleanup client not found errors.
And fix remove calls to return a notFound error

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 81bb9978ab5ac99e84a5bf62d0d469f0aec1d506
Component: engine
2017-09-11 19:53:18 -04:00
2c45bc6a92 Merge pull request #34770 from dnephin/fix-client-with-empty-id
Fix volume inspect with empty ID
Upstream-commit: 63a9ea58eb4c704ed7d7dab950f12f708cf220f7
Component: engine
2017-09-11 07:01:50 -07:00
af0adf66d4 Merge pull request #34790 from dnephin/add-ineffassign-linter
Add ineffassign linter
Upstream-commit: 13fec0607394f7c6da0148f8d513b6fcbf7cce61
Component: engine
2017-09-09 15:41:55 -07:00
fdd3e06a77 Add ineffassign linter
Also enable GC in linting to reduce memory usage.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 09652bf8789142a5a5a1de2d41590300761b4954
Component: engine
2017-09-08 18:23:21 -04:00
5899c64938 Fix volume inspect with empty ID
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5ac298fd0e5c065483653970be587626026971c2
Component: engine
2017-09-07 13:46:23 -04:00
980d05f2ea Cleanup client/ interface
- Remove ParseLogDetails, this is not part of the client. Moved to docker/cli
- Deprecate ParseHost and replace with ParseHostURL
- Deprecate redundant IsErr helpers

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 54242cd067c234960d1295a67271475f9d099f22
Component: engine
2017-09-07 12:32:38 -04:00
6f155f233b Merge pull request #34021 from nishanttotla/dont-set-architecture-constraint
Clear Architecture field in platform constraint for arm architectures
Upstream-commit: ea220e70a13963da544645376cd9331021eec6b4
Component: engine
2017-09-07 11:18:12 +02:00
9f20b18453 Move tlsconfig to client package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6916c215b00ab4d7edf4be14848ab2e695697381
Component: engine
2017-09-06 16:39:55 -04:00
2578773887 Clear Architecture field in platform constraint for arm architectures
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: 772af6040ed4f2f26c22901597333a900be17aae
Component: engine
2017-09-01 13:08:20 -07:00
8ef302a435 Merge pull request #34625 from dnephin/more-linters
Add interfacer and unconvert linters
Upstream-commit: cb952bf00695b3429476f59c5534a9c604c6f010
Component: engine
2017-09-01 08:46:08 -07:00
9cb0439501 Move ErrorContains to an internal package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e62b2d410cda6ac9166ac8d052fd3fb99a9460bf
Component: engine
2017-08-25 12:04:58 -04:00
157456237a Add interfacer linter
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 709bf8b7bcc67f3ea3a7a39e29af8ae16a38b06f
Component: engine
2017-08-24 15:08:26 -04:00
94c685a721 Add deadcode linter
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 62c1f0ef41e6cd88a8846da1c11976a320ca8b41
Component: engine
2017-08-21 18:18:50 -04:00
6b3b192846 Add goimports to linters.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 372670b5074b077927314cdf46af30f8752e7db0
Component: engine
2017-08-21 18:15:08 -04:00
e89e83b8bc client should return imageNotFound error when API returns 404 status code
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 33d82b78d03f7db4ef743951c6a004ba4fe64637
Component: engine
2017-08-15 17:16:02 -04:00
417e5624cd Fix requests for docker host ending with slash
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 823e88d4c4298c38130b9a387a45c47cf957a931
Component: engine
2017-08-11 10:47:02 -07:00
a66a5d1d6a fix client.Transport
`client.Transport` is `http.Client.Transport` just has `RoundTripper()`. Not `http.Transport`. So we cannot convert it here.

For a mock test, I can play with this https://play.golang.org/p/gs7_QrL9-Y

Signed-off-by: wrfly <mr.wrfly@gmail.com>
Upstream-commit: e345cd12f96b3985257652b606c8463a5772944b
Component: engine
2017-08-03 17:14:26 +08:00
7deeee36b6 Remove client/session package, depend on buildkit's session package
gofmt -w -r '"github.com/docker/docker/client/session" -> "github.com/moby/buildkit/session"'
gofmt -w -r '"github.com/docker/docker/client/session/filesync" -> "github.com/moby/buildkit/session/filesync"'

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 41445a4745451b99d1c361c6c87447da790cb01b
Component: engine
2017-07-28 16:34:23 -07:00
5ff9e5001c Fix panic in hijack
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 7a53991bd6200b875e492d9c3f8e99a9a0c11056
Component: engine
2017-07-25 22:46:41 -07:00
5eaf5cc8fa Merge pull request #33887 from thaJeztah/update-version-error
Fix NewVersionError() for clients using default version
Upstream-commit: 45cad73ea8abc5e87d5db1a4a47c8565531d769f
Component: engine
2017-07-12 15:24:00 +02:00
c782cb6c44 Make plugin emit strongly typed, consumable events
Enables other subsystems to watch actions for a plugin(s).

This will be used specifically for implementing plugins on swarm where a
swarm controller needs to watch the state of a plugin.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 72c3bcf2a533a827402945e3a55872e2db4fb024
Component: engine
2017-07-06 14:26:06 -04:00
c36d6e2e41 Merge pull request #33859 from tonistiigi/session-includepaths
Add path filtering to build session client
Upstream-commit: 19ee87361685ae63aa2eca4a2ae5a2035484814b
Component: engine
2017-07-05 18:21:48 -07:00
ec1ee882b3 Merge pull request #33322 from jsoref/spelling
Spelling
Upstream-commit: ff4f700f74450018f36d014f3cde0ff1b9c17fb3
Component: engine
2017-07-04 15:46:34 +02:00
f2ec8286bb Merge pull request #33494 from cpuguy83/document_stream_format_in_client_lib
Add stream format details for attach/logs endpoint
Upstream-commit: a9358df62cde2deb8184c742e6fb8d16c98a04a9
Component: engine
2017-07-03 22:02:24 -07:00
643654c2f0 Spelling fixes
* additional
* ambiguous
* anonymous
* anything
* application
* because
* before
* building
* capabilities
* circumstances
* commit
* committer
* compresses
* concatenated
* config
* container
* container's
* current
* definition
* delimiter
* disassociates
* discovery
* distributed
* doesnotexist
* downloads
* duplicates
* either
* enhancing
* enumerate
* escapable
* exactly
* expect
* expectations
* expected
* explicitly
* false
* filesystem
* following
* forbidden
* git with
* healthcheck
* ignore
* independent
* inheritance
* investigating
* irrelevant
* it
* logging
* looking
* membership
* mimic
* minimum
* modify
* mountpoint
* multiline
* notifier
* outputting
* outside
* overridden
* override
* parsable
* plugins
* precedence
* propagation
* provided
* provides
* registries
* repositories
* returning
* settings
* should
* signals
* someone
* something
* specifically
* successfully
* synchronize
* they've
* thinking
* uninitialized
* unintentionally
* unmarshaling
* unnamed
* unreferenced
* verify

Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 39bcaee47b8a284a46b761afe218ba7deda0d482
Component: engine
2017-07-03 13:13:09 -07:00
1a311235ba Always perform version-negotiation
If a client is initialized without a specific
version set, version negotiation would not be
functional.

This patch changes the behavior to always
perform version negotation (if called), in
which case the "current" (maximum supported
API version) is used as a default.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5975dc4b4b8a6fa2e0edd1f1b113e7f66dad732b
Component: engine
2017-06-29 22:24:49 -07:00
5852d59e6d Fix NewVersionError() for clients using default version
The NewVersionError checks if the client is using the API version
required for using a specific feature.

If the client is initialized without setting a specific version, an
error would be generated because it was not possible to compare
versions. However, a client without explicit version set is running
the latest supported version.

This patch changes the behavior to only generate an error if a version
was set.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ff2ed1853099a210245814b4263ce1c92b14c153
Component: engine
2017-06-29 22:22:32 -07:00
e0679f41e0 Merge pull request #33827 from cpuguy83/return_ping_data_if_available
Set ping version even on error
Upstream-commit: 654bb6368b838bc619a5d612a39abb385fbd45c3
Component: engine
2017-06-29 12:27:23 -07:00
85421deb82 Set ping version even on error
In some cases a server may return an error on the ping response but
still provide version details. The client should use these values when
available.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 27ef09a46ffeb8ba42548de937b68351009f30ea
Component: engine
2017-06-29 12:42:14 -04:00
30ba67aee0 Do not add duplicate platform information to service spec
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: da85b62001ec390bdc30b321c4a5cd23c17eeb81
Component: engine
2017-06-28 16:01:05 -07:00
77cf31b37e add test for filesync path filtering and testutil helper
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4141d8fe5da596e7ee1eec217378aeb684d0a99e
Component: engine
2017-06-28 09:12:36 -07:00
1c25f0d80a builder: enable path filtering for filesync session
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ad46348d7c9f8a84d61e1ba5f08c8fd0727e4ebc
Component: engine
2017-06-28 09:12:30 -07:00
ee1b2dfe8c Merge pull request #33467 from bschwind/copy-documentation
Add note to CopyToContainer documentation
Upstream-commit: 5564fad4068619e7d0c5fd7defe7dd5e3f0edd8c
Component: engine
2017-06-24 00:19:51 -07:00