Commit Graph

2230 Commits

Author SHA1 Message Date
478844dff8 Implement content addressability for plugins
Move plugins to shared distribution stack with images.

Create immutable plugin config that matches schema2 requirements.

Ensure data being pushed is same as pulled/created.

Store distribution artifacts in a blobstore.

Run init layer setup for every plugin start.

Fix breakouts from unsafe file accesses.

Add support for `docker plugin install --alias`

Uses normalized references for default names to avoid collisions when using default hosts/tags.

Some refactoring of the plugin manager to support the change, like removing the singleton manager and adding manager config struct.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 3d86b0c79b16334ce5836c0315e4c310b84c2e17
Component: engine
2016-12-23 13:29:58 -08:00
efaab09327 Add a GetAll function that returns only managed plugins supported by V2
The current GetAll handles both V2 and legacy plugins. Also due to the
nature of V1 plugins, it also loads them. This causes problems when
loading is not required. Hence adding an independent API that will
return only the plugins that are loaded using v2 mangaed plugins.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 8f1b793528e01004e4a40fe4ef835e235282b2f4
Component: engine
2016-12-22 10:26:04 -08:00
433a6ae35a Merge pull request #29314 from vdemeester/no-more-utils
Remove the utils package
Upstream-commit: b9ee31ae027bbd62477fea3f58023c90f051db00
Component: engine
2016-12-22 15:21:05 +01:00
97f0ab72fa Merge pull request #29527 from allencloud/change-minor-mistake
change minor mistake of spelling
Upstream-commit: b2e348f2a6ab2d5396acf4bb56aea7e49c3e2097
Component: engine
2016-12-21 13:15:00 -05:00
a0007159e8 Merge pull request #29577 from lixiaobing10051267/masterDevice
several function names fixed in devmapper.go
Upstream-commit: de92e2fa7419e2aaba1b07c1085cb576df049bf7
Component: engine
2016-12-21 12:21:22 -05:00
44fa4f8ae7 duplicated the
Signed-off-by: Jie Luo <luo612@zju.edu.cn>

typo

Signed-off-by: Jie Luo <luo612@zju.edu.cn>

fix some typos

Signed-off-by: Jie Luo <luo612@zju.edu.cn>
Upstream-commit: ea2dd4b5d0b41552d047814d9e39ddaa3662ab41
Component: engine
2016-12-21 20:16:19 +08:00
59c54dda91 several function names fixed in devmapper.go
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>

Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: f93b41e9261f96d4f3b2337f1ff419de42871489
Component: engine
2016-12-21 10:45:28 +08:00
209ed6b4ef change minor mistake of spelling
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 7c3657065cc04af278a0f1cee99de8c2401ba0ef
Component: engine
2016-12-20 21:05:19 +08:00
0fd4d2ba16 Use wrong ApplyLayer in diff_windows.go
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 9501f2ea978bf13d2f050f31223b15fad5b26622
Component: engine
2016-12-19 17:21:18 +08:00
035a86c3f5 Merge pull request #29439 from lixiaobing10051267/masterWalk
rectify function and variable referred in pkg/archive/changes_linux.go
Upstream-commit: 545b97e6bc0f7e1be4e7f54604389d7584dc9658
Component: engine
2016-12-16 17:25:09 -08:00
c9e434865c Move pkg to cli/compose/convert
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 643fd775edb0a05d649f4d484e966428eb3a6b09
Component: engine
2016-12-16 12:27:31 -05:00
8d30926318 More unit tests for converting services in stack deploy
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4664dd06f1184d11c62de8a4e5e6653ed26c3790
Component: engine
2016-12-16 12:20:07 -05:00
930d936818 Move ConvertService to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 655e48e65309f0191bbbb8b2e9730b6976e148cd
Component: engine
2016-12-16 12:20:07 -05:00
cb4b458233 Move ConvertVolumes to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7685e80fc9cb79206d81757eee071f0244323600
Component: engine
2016-12-16 11:51:13 -05:00
20aacdd131 Move ConvertNetworks to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6b778c96336fe9c0bcfea477092aab8cdfc0c896
Component: engine
2016-12-16 11:51:13 -05:00
ec888ed9cd rectify function and variable referred in pkg/archive/changes_linux.go
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>

Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: e5ada578c3b0b554b5d996127ac6f5803cdb9431
Component: engine
2016-12-16 14:58:47 +08:00
e09abd9511 Merge pull request #29366 from unclejack/pkg_return_directly
pkg: return directly without ifs where possible
Upstream-commit: 8415aeb39ae45e4414785f76ee63438ffc9517eb
Component: engine
2016-12-14 21:20:26 +01:00
f541c344f4 Merge pull request #29008 from cpuguy83/refcount_graphdriver
Refcount graphdriver plugins properly
Upstream-commit: af50cefe6cdf07e2028b9ad934a2cb5818a935eb
Component: engine
2016-12-13 19:24:46 -08:00
f9eb0e420f pkg: return directly without ifs where possible
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 418e6123834def872edef06972c16d97b4cbc542
Component: engine
2016-12-13 22:10:11 +02:00
d0d8fac761 Get rid of err altogether by just returning the assignment
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
Upstream-commit: da5d3cccc43a9ee51c8b37c751cfbc2a4e16e9ee
Component: engine
2016-12-13 14:25:57 +08:00
e451072298 Merge pull request #29287 from Microsoft/jjh/fixd4w301
Windows: Fix crash in docker system prune
Upstream-commit: a1307aab28289cb8c05fd94011b269966a1ad742
Component: engine
2016-12-12 10:30:13 +01:00
57d5fc9bfa Move templates to pkg/templates
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 04f7a03359ac009ad2cd548fa93124a66e880ae5
Component: engine
2016-12-12 09:34:03 +01:00
90c004590f Move process functions to pkg/system
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8c1ac816657a1371597c4b2d1a758bee0114e0d7
Component: engine
2016-12-12 09:28:41 +01:00
74e9315982 Move utils.TestDirectory to pkg/testutil/tempfile
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0ab9320ab28afbf62a8b81e5f151db908897df86
Component: engine
2016-12-12 09:28:32 +01:00
6dcc37964b Refcount graphdriver plugins properly
Adds 2 new methods to v2 plugin `Acquire` and `Release` which allow
refcounting directly at the plugin level instead of just the store.
Since a graphdriver is initialized exactly once, and is really managed
by a separate object, it didn't really seem right to call
`getter.Get()` to refcount graphdriver plugins.
On shutdown it was particularly weird where we'd either need to keep a
driver reference in daemon, or keep a reference to the pluggin getter in
the layer store, and even then still store extra details on if the
graphdriver is a plugin or not.

Instead the plugin proxy itself will handle calling the neccessary
refcounting methods directly on the plugin object.

Also adds a new interface in `plugingetter` to account for these new
functions which are not going to be implemented by v1 plugins.

Changes terms `plugingetter.CREATE` and `plugingetter.REMOVE` to
`ACQUIRE` and `RELEASE` respectively, which seems to be better
adjectives for what we're doing.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f29bbd16f5d2bb82d815ea59f8ef85fe59384c89
Component: engine
2016-12-09 19:46:28 -05:00
4c8ed1c0c8 Windows: Fix crash in docker system prune
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: e5900ee9bf0071c6a3ebaf813f82d5345c25d8f0
Component: engine
2016-12-09 14:23:25 -08:00
71651385ac Extract daemon to its own package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 48de91a33f097d4c20515088af1f5bcb9a98c5c9
Component: engine
2016-12-09 22:26:42 +01:00
6b1a2692bb Merge pull request #26398 from tiborvass/plugin-fixes
plugins: container-rootfs-relative paths
Upstream-commit: 0a072e93df6ad10e37bbf0b1f540fff7b7581a75
Component: engine
2016-12-09 12:48:59 -08:00
656f60dc73 plugins: container-rootfs-relative paths
Legacy plugins expect host-relative paths (such as for Volume.Mount).
However, a containerized plugin cannot respond with a host-relative
path. Therefore, this commit modifies new volume plugins' paths in Mount
and List to prepend the container's rootfs path.

This introduces a new PropagatedMount field in the Plugin Config.
When it is set for volume plugins, RootfsPropagation is set to rshared
and the path specified by PropagatedMount is bind-mounted with rshared
prior to launching the container. This is so that the daemon code can
access the paths returned by the plugin from the host mount namespace.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: c54b717caf1a55e525ce180bfcb42addd59c6633
Component: engine
2016-12-09 10:16:24 -08:00
d377a823f5 Merge pull request #29244 from yuexiao-wang/fix-typos-eg
Fix a bit typos
Upstream-commit: d1515a5264e7872bfe11543b2b23b4f1eac23f68
Component: engine
2016-12-09 16:03:35 +09:00
795fc21c8b Fix a bit typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 11454e1c97ed5495e77a06868a0c199d81aa96c3
Component: engine
2016-12-09 03:05:11 +08:00
41c08096ed Merge pull request #28924 from xlgao-zju/fix-apparmor-load-profile
fix apparmor load profile
Upstream-commit: 68a423304ec0a9ee590ced5ebbdb27f359cee365
Component: engine
2016-12-08 08:47:27 -08:00
7eb856b2dd Merge pull request #28939 from duglin/HideDupWarnings
Only show global warnings once
Upstream-commit: e8a2c7196a2715c318bbfb2b57076fa1922a245f
Component: engine
2016-12-06 16:12:34 +09:00
161d115fd3 Merge pull request #29043 from duglin/Issue29014
Fix use of **/ in .dockerignore
Upstream-commit: 8895ee0b4d22fb48b496f3f0a0589c2b6c8031a6
Component: engine
2016-12-02 08:34:45 -08:00
330477b5f0 Fix use of **/ in .dockerignore
.dockerignore pattern of **/.foo incorrectly matched **/bar.foo
because **/.foo was getting converted into a .*\.foo regex
instead of (.*/)*\.foo

Closes #29014

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 376bb84c5c8f6183dbb88dae705e1de4182da4c9
Component: engine
2016-12-02 03:58:54 -08:00
abe19725d9 Merge pull request #28996 from Microsoft/jjh/sqlite-remove-windows
Windows: Factor out sqlite
Upstream-commit: a756c1ac659468bb8d6ec9ee2e1182fc6cae4002
Component: engine
2016-12-01 13:56:11 -08:00
c3ca8eccc1 Windows: Factor out sqlite
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 3f6127b173949cb36557601a56bc15ae2c45a698
Component: engine
2016-12-01 09:38:08 -08:00
ed1107ee39 Merge pull request #28784 from thaJeztah/add-some-adjectives
Add some adjectives to the namesgenerator
Upstream-commit: 0bf4510a53f09bc55942e5d894f8a1b78b6ac055
Component: engine
2016-11-30 11:46:56 -08:00
ba962e129a Merge pull request #28487 from cpuguy83/stack_dumps
Move stack dump dir to exec root
Upstream-commit: 6367c67ab71916d677d3498f0bb536da9ae63597
Component: engine
2016-11-30 20:01:29 +01:00
3077005306 Only show global warnings once
Upon each container create I'm seeing these warning **every** time in the
daemon output:
```
WARN[0002] Your kernel does not support swap memory limit
WARN[0002] Your kernel does not support cgroup rt period
WARN[0002] Your kernel does not support cgroup rt runtime
```
Showing them for each container.create() fills up the logs and encourages
people to ignore the output being generated - which means its less likely
they'll see real issues when they happen.  In short, I don't think we
need to show these warnings more than once, so let's only show these
warnings at daemon start-up time.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: ff42a2eb41a86217a440a1c4b2afd3c4cd1d48ac
Component: engine
2016-11-30 10:11:42 -08:00
911f8f8001 fix apparmor load profile
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
Upstream-commit: 2ab8f2e389b4ae90d0cec6555ea5708ceca1cc3c
Component: engine
2016-11-29 15:48:38 +08:00
dc8295e701 Add some adjectives to the namesgenerator
Because .. `hardcore_hamilton` and `inspiring_murdock`

https://twitter.com/swiftonsecurity/status/801195049165799424

Also replacing adjectives that could be interpreted as
refering to body size, (mental) health, intoxication.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 169b4d92a15a08683e3f3afe7f278d9a0199153a
Component: engine
2016-11-24 18:38:04 +01:00
167591374d Merge pull request #28683 from darrenstahlmsft/SystemDLL
Swap usage of LazyDLL and LoadDLL to LazySystemDLL
Upstream-commit: 5c1826ec4de381df9f739ce0de28e37d4f734d47
Component: engine
2016-11-22 16:58:30 -08:00
4d1ac89cc0 Swap usage of LazyDLL and LoadDLL to LazySystemDLL.
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 22c83c567f379dfd475ecd35665e1cc9e5b9c314
Component: engine
2016-11-22 14:57:11 -08:00
dc5227ef8f Merge pull request #28506 from bfirsh/prepare-api-docs-for-swagger-docs
Prepare docs and Swagger definition for automatically generated API docs
Upstream-commit: 313502488e8809910127891d8923672baf43a742
Component: engine
2016-11-22 22:47:38 +01:00
4c1ce8ff4b Merge pull request #28698 from YuPengZTE/devErrot
error strings should not be capitalized or end with punctuation
Upstream-commit: 86eae4018a06c0291f9572cd7f062f320b612698
Component: engine
2016-11-22 21:25:09 +01:00
419cdb27d7 Merge pull request #28595 from anusha-ragunathan/plugin_timeout
Allow HTTP client timeout to be configurable on plugin enable.
Upstream-commit: 677e14643c79184ca9d8123dd3e91e0444b1cac3
Component: engine
2016-11-22 10:17:10 -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
28a6abec82 error strings should not be capitalized or end with punctuation
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: fc11efa2dbf72bb493a24650860220a2d4b07c5e
Component: engine
2016-11-22 14:53:11 +08:00
163c2e9b09 First header should be a top level header
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: 1e65db4206ba89af24400fbf9047b25ec98cfd02
Component: engine
2016-11-22 09:33:21 +08:00