Commit Graph

170 Commits

Author SHA1 Message Date
358cb6ec63 Refactor API socket handling
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 62806cc85e7faee56acc454b67b8f36786472759
Component: engine
2015-03-31 13:37:49 -07:00
c31a2f1ade Move Profiler into specific http.Handler
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 7609d5279743b47450cc1273ee75504bb6abf8b6
Component: engine
2015-03-31 11:38:17 -07:00
45221d6bfb Ensure that bridge driver does not use global mappers
This has a few hacks in it but it ensures that the bridge driver does
not use global state in the mappers, atleast as much as possible at this
point without further refactoring.  Some of the exported fields are
hacks to handle the daemon port mapping but this results in a much
cleaner approach and completely remove the global state from the mapper
and allocator.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: d8c628cf082a50c0a2a5e381a21da8279a5462b4
Component: engine
2015-03-30 18:28:24 -07:00
dfa22e2d7b Merge pull request #11859 from HuKeping/eof
Add nice error message
Upstream-commit: fe9f3227b18504add673b9c62669032c3f17e726
Component: engine
2015-03-30 13:53:09 -07:00
1bfc9627bf Use ContainerCommitResponse struct for Commit cmd
Signed-off-by: Jamie Hannaford <jamie.hannaford@rackspace.com>
Upstream-commit: 8b795a05a8fa8a6f747ee5cc0c087bca9d42199d
Component: engine
2015-03-28 17:55:45 +01:00
9d0d13f217 Add nice error message
Generally, when using Remote API to push images there needs a http Header
X-Registry-Auth.
For compatibility if there was no authConfig header, everything will be
okay if a proper JSON-http-body was applied.

But when both X-Registry-Auth Header and the Body are missing, due to
the function of decode JSON, it will return an EOF error which was not
very clear to user.

So I think we can make the respone error be more nice.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: cee62a95a2086dace52f2492de781aa333abca3b
Component: engine
2015-03-28 16:27:30 +08:00
a44788dbfa Merge pull request #11845 from lobatt/master
Issue #11836
Upstream-commit: c0884860931273ef26bc26fb7d97081b3ae2aaef
Component: engine
2015-03-27 14:55:04 -07:00
1c9316a817 Merge pull request #11788 from reikani/pchoi
Changed snake case naming to camelCase.
Upstream-commit: da5c863d20df8c030b3ffc6c4e95f976ed162721
Component: engine
2015-03-26 23:55:50 -07:00
8de06741d7 Issue #11836
Signed-off-by: chli <chli@freewheel.tv>
Upstream-commit: f581f742095e4b01b73e391546ee11323f8b5fd7
Component: engine
2015-03-26 19:18:23 -04: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
0913f2905d Changed snake case naming to camelCase
Signed-off-by: Peter Choi <phkchoi89@gmail.com>
Upstream-commit: ae907e7af16136225417242ef5d55d3f6062fb3b
Component: engine
2015-03-26 15:05:45 -06:00
db74987998 Merge pull request #11789 from parknicker/PostContainerWaitFix
Changes response of postContainersWait to use a struct
Upstream-commit: d4fca8047cc4b4b3bf21900c34169ee99cb17ad8
Component: engine
2015-03-26 08:40:00 -07:00
bfdce6caee Changes response of postContainersWait to use a struct
Signed-off-by: Nick Parker <nikaios@gmail.com>
Upstream-commit: 1bc266dfa714f097cc9babf2f0c771566388d47b
Component: engine
2015-03-25 21:01:14 -06: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
a16f3d6cb4 Remove engine.Status and replace it with standard go error
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: c79b9bab541673af121d829ebc3b29ff1b01efa2
Component: engine
2015-03-25 22:32:08 +01:00
287b673e43 Return AuthResponse from postAuth api endpoint, Fixes #11607
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: babd1b3e1fd7be7674f6e96f264b1b841aeba3b9
Component: engine
2015-03-24 09:57:01 +01:00
a82b5988e8 Return ContainerExecCreateResponse from container exec start API endpoint, Fixes #11613
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 0c3d2f6f9658ae9b1e7c7cc6f7fda730d4b04898
Component: engine
2015-03-24 00:41:54 +01:00
088f0e2cb3 Merge pull request #9774 from pwaller/cancellation
Add basic build cancellation
Upstream-commit: 45ee402a631a59e2a33df7b2f63a49f6f3f84f09
Component: engine
2015-03-22 19:16:23 -07:00
7c1bfa9093 Implement build cancellation
Add the capability to cancel the build by disconnecting the client.

This adds a `cancelled` channel which is used to signal that a build
should halt. The build is halted by sending a Kill signal and noticing
that the cancellation channel is closed.

This first pass implementation does not allow cancellation during a
pull, but that will come in a subsequent PR.

* Add documentation of cancellation to cli and API

* Protect job cancellation with sync.Once

* Add TestBuildCancelationKillsSleep

* Add test case for build cancellation of RUN statements.

Signed-off-by: Peter Waller <p@pwaller.net>
Upstream-commit: 671c12204cb469d868f646da1474d5bad6541770
Component: engine
2015-03-22 11:31:28 +00:00
449ca606a0 Add integration test for unix sock cleanup
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 16309bef6395a50ee2871780b81caed8bc6c498e
Component: engine
2015-03-20 12:34:35 -04:00
e274da0bb7 Implement cleanup unix sockets after serving.
Signed-off-by: Rik Nijessen <riknijessen@gmail.com>
Upstream-commit: 0c0e9836c4bed0190718b0ddd0028790b19c200c
Component: engine
2015-03-20 09:12:59 -04:00
5e80a64076 Allow setting resource constrains for build
Closes #10191

Allow `docker build` to set --cpu-shares, --cpuset, --memory,
--memory-swap for all containers created by the build.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e6ae89a45a699bd44f03517396777e34ec76018b
Component: engine
2015-03-18 20:57:13 -04:00
7a404617a3 Merge pull request #11402 from miminar/err-cleanup
Error formatting cleanups
Upstream-commit: 88f437d6c619f7b07a22cb5750814bce4d8d7164
Component: engine
2015-03-16 16:13:16 -07:00
1902f8ca99 Merge pull request #11300 from Microsoft/10662_jjh_server_factor_serverfd_and_systemd_for_windows
Factor out ServeFD & systemd in server for Linux only (Not Windows)
Upstream-commit: 66bf7a269a29c1058384727ec852024198a5db77
Component: engine
2015-03-16 14:12:48 -07:00
c29e43cc4b Format error by value
- Use `%v` verb to format errors.
- Give `param` constant in portallocator some better name.

Signed-off-by: Michal Minar <miminar@redhat.com>
Upstream-commit: 210ab030bc3dab7bcf8f7252f2f9facb5a26cb6b
Component: engine
2015-03-16 12:05:53 +01:00
9bd1fc5995 Correctly check that gid parses as an int
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: 8ef79ae8e42ae020a373712bd7d08bcb81e3fa97
Component: engine
2015-03-14 23:02:53 +00:00
b9f12f801a Allow a non-existent groupid to own the docker socket
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: 334382a8c31285689f0b060de81b8f631d928970
Component: engine
2015-03-13 18:12:50 +00:00
806995e9fe Factor out ServeFD & systemd in server for Linux only (Not Windows)
Signed-off-by: John Howard <John.Howard@microsoft.com>
Upstream-commit: 081c6c76e2e9924159e1d320525048e4657a9e74
Component: engine
2015-03-10 15:06:16 -07:00
102aaf6e25 Merge pull request #11219 from icecrime/remove_maintainers_files
Remove subdirectories MAINTAINERS files
Upstream-commit: c5f9aa18f4a09a0ab6743d1e7c2de1ee355461cc
Component: engine
2015-03-09 09:02:58 -07:00
5506a9a27c Remove subdirectories MAINTAINERS files
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 89bdaa35e04b74b7c6528783e0f7b8154b2a3d31
Component: engine
2015-03-06 18:21:51 -08:00
1c4e8d93e0 Improve error messages for loading tls keys
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 2ea6c2c264f0f43beb877a83aea3e6e6ad38ae5d
Component: engine
2015-03-06 20:40:09 -05:00
d382609cd2 Rebase & update api doc v1.18 instead
Signed-off-by: harry zhang <resouer@163.com>
Upstream-commit: dc0a6c1f5edd78d23ab676c54c3e84df3c2b2bbf
Component: engine
2015-03-03 12:32:17 +08:00
f947fbc4ae Add cors header flag and leave boolean flag not changed
Deprecate api-enable-cors

Update docs & man files

Signed-off-by: harry zhang <resouer@163.com>
Upstream-commit: f3dd2db4ff7de1399a49af928cd3eae4fccf8764
Component: engine
2015-03-03 11:21:19 +08:00
7023b06ad1 Merge pull request #10971 from Microsoft/10662-api_server_factor_out_windows
api\server: Factored out UnixHttp on Windows, supported on Linux only.
Upstream-commit: c5ecdfd878d67d0595561a04e4945f60893f8c6f
Component: engine
2015-03-02 12:40:20 -08:00
c6435e1b51 Merge pull request #10986 from crosbymichael/create-api-type
Create api types package for structured responses
Upstream-commit: 2bfa701f45b55fbfd7e5d5a1d6fa45a8d84cd19a
Component: engine
2015-03-02 12:22:02 -08:00
d7d038bd8a api\server: Factored out UnixHttp on Windows, supported on Linux only.
Signed-off-by: John Howard <John.Howard@microsoft.com>
Upstream-commit: 69246e15276d7010c00269be140b9fb1a5c11ae5
Component: engine
2015-02-25 09:24:34 -08:00
ab99465eeb Add ContainerCreateResponse type
This type is produced on the server side and is a type safe struct that
can be encoded to json.  It is consumed via the client.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: f57c26553b91e16fa3ee6a815943eaf8f29af82b
Component: engine
2015-02-24 15:27:49 -08:00
4e766f5eaa pass --change changes to the import job
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 17abfc3ddc79592753289a8556a343e276fb15b5
Component: engine
2015-02-24 13:01:36 -05:00
280f363541 pass --change changes to the commit job
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: rhatdan)
Upstream-commit: f8e77dfb3de50b3c4f0f8c852389a6ed5bcbcd6e
Component: engine
2015-02-24 13:01:35 -05:00
05600313fd api/server: don't print warning if serving on localhost
Fixes bug #10728

Signed-off-by: mattyw <gh@mattyw.net>
Upstream-commit: 0ae455333b3357f30f27da10557e4d9c006b5ba7
Component: engine
2015-02-20 12:37:17 +08:00
dfd79f3c67 Merge pull request #9705 from acbodine/9311-truncindex-error-duplicate-id-on-ambiguous-id
Closes #9311 Handles container id/name collisions against daemon functionalities according to #8069
Upstream-commit: 34c804a139cc086e9fa6d3f99442f083b6d5e1e7
Component: engine
2015-02-06 14:01:28 -08:00
12b02aa7f6 Revert client signature
Supports multiple tag push with daemon signature

Fixes #10444

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 403d981d70dc8a493a9a10be4b5d2e2ce871f380
Component: engine
2015-01-30 14:20:32 -08:00
685b876322 Closes #9311 Handles container id/name collisions against daemon functionalities according to #8069
Signed-off-by: Andrew C. Bodine <acbodine@us.ibm.com>
Upstream-commit: d25a65375c880017ac0c516389b0b7afde810517
Component: engine
2015-01-21 17:11:31 -08:00
947efff180 Implement container stats collection in daemon
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 65f58e2a742205c9e8470b360bd439642a5c8211
Component: engine
2015-01-20 20:21:46 -08:00
6a46693a7d Push flow
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 188b56c836e49e3c888e1e27e4e26b5cc0f1caaa
Component: engine
2015-01-15 14:05:05 -08:00
a75e2deaba Remove error return type from createRouter and ServeRequest
Signed-off-by: Pierre Wacrenier <pierre.wacrenier@gmail.com>
Upstream-commit: 02923d43e20f7be6c2e1ed48846d188a682ff919
Component: engine
2015-01-13 22:43:31 +01:00
eacdfc7d44 rename a existing container
Closes #3036

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 21a809d9ae0ef8392f37c9262dca93ff31966e22
Component: engine
2015-01-13 03:27:17 +00:00
269ee3bcdf Allow for Dockerfile to be named something else.
Add a check to make sure Dockerfile is in the build context
Add docs and a testcase
Make -f relative to current dir, not build context

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: eb3ea3b43c716ad727521a7d0bc20d7321bb0867
Component: engine
2015-01-06 16:33:26 -08:00
2a5b064872 Merge pull request #9795 from LK4D4/update_libcontainer
Update libcontainer to 1597c68f7b941fd97881155d7f077852e2914e7b
Upstream-commit: 305c898cd7fa8e7152f3f01cfdc2f5c14b4d35f0
Component: engine
2014-12-23 15:41:26 -08:00
c77458bef6 Update libcontainer to 1597c68f7b941fd97881155d7f077852e2914e7b
This commit contains changes for docker:
* user.GetGroupFile to user.GetGroupPath docker/libcontainer#301
* Add systemd support for OOM docker/libcontainer#307
* Support for custom namespaces docker/libcontainer#279, docker/libcontainer#312
* Fixes #9699 docker/libcontainer#308

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 50905a6d6ce2fdd1ab0c33ec0b7a26895e0cbeea
Component: engine
2014-12-23 12:10:03 -08:00