Commit graph

2230 commits

Author SHA1 Message Date
Tonis Tiigi
3d86b0c79b 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>
2016-12-23 13:29:58 -08:00
Madhu Venugopal
8f1b793528 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>
2016-12-22 10:26:04 -08:00
Sebastiaan van Stijn
b9ee31ae02 Merge pull request #29314 from vdemeester/no-more-utils
Remove the utils package
2016-12-22 15:21:05 +01:00
Brian Goff
b2e348f2a6 Merge pull request #29527 from allencloud/change-minor-mistake
change minor mistake of spelling
2016-12-21 13:15:00 -05:00
Brian Goff
de92e2fa74 Merge pull request #29577 from lixiaobing10051267/masterDevice
several function names fixed in devmapper.go
2016-12-21 12:21:22 -05:00
Jie Luo
ea2dd4b5d0 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>
2016-12-21 20:16:19 +08:00
lixiaobing10051267
f93b41e926 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>
2016-12-21 10:45:28 +08:00
allencloud
7c3657065c change minor mistake of spelling
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-20 21:05:19 +08:00
lixiaobing10051267
9501f2ea97 Use wrong ApplyLayer in diff_windows.go
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2016-12-19 17:21:18 +08:00
Aaron Lehmann
545b97e6bc Merge pull request #29439 from lixiaobing10051267/masterWalk
rectify function and variable referred in pkg/archive/changes_linux.go
2016-12-16 17:25:09 -08:00
Daniel Nephin
643fd775ed Move pkg to cli/compose/convert
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-12-16 12:27:31 -05:00
Daniel Nephin
4664dd06f1 More unit tests for converting services in stack deploy
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-12-16 12:20:07 -05:00
Daniel Nephin
655e48e653 Move ConvertService to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-12-16 12:20:07 -05:00
Daniel Nephin
7685e80fc9 Move ConvertVolumes to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-12-16 11:51:13 -05:00
Daniel Nephin
6b778c9633 Move ConvertNetworks to composetransform package.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-12-16 11:51:13 -05:00
lixiaobing10051267
e5ada578c3 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>
2016-12-16 14:58:47 +08:00
Phil Estes
8415aeb39a Merge pull request #29366 from unclejack/pkg_return_directly
pkg: return directly without ifs where possible
2016-12-14 21:20:26 +01:00
Tibor Vass
af50cefe6c Merge pull request #29008 from cpuguy83/refcount_graphdriver
Refcount graphdriver plugins properly
2016-12-13 19:24:46 -08:00
unclejack
418e612383 pkg: return directly without ifs where possible
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2016-12-13 22:10:11 +02:00
Xianglin Gao
da5d3cccc4 Get rid of err altogether by just returning the assignment
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2016-12-13 14:25:57 +08:00
Vincent Demeester
a1307aab28 Merge pull request #29287 from Microsoft/jjh/fixd4w301
Windows: Fix crash in docker system prune
2016-12-12 10:30:13 +01:00
Vincent Demeester
04f7a03359
Move templates to pkg/templates
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-12 09:34:03 +01:00
Vincent Demeester
8c1ac81665
Move process functions to pkg/system
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-12 09:28:41 +01:00
Vincent Demeester
0ab9320ab2
Move utils.TestDirectory to pkg/testutil/tempfile
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-12 09:28:32 +01:00
Brian Goff
f29bbd16f5 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>
2016-12-09 19:46:28 -05:00
John Howard
e5900ee9bf Windows: Fix crash in docker system prune
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-12-09 14:23:25 -08:00
Vincent Demeester
48de91a33f Extract daemon to its own package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-09 22:26:42 +01:00
Anusha Ragunathan
0a072e93df Merge pull request #26398 from tiborvass/plugin-fixes
plugins: container-rootfs-relative paths
2016-12-09 12:48:59 -08:00
Tibor Vass
c54b717caf 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>
2016-12-09 10:16:24 -08:00
Akihiro Suda
d1515a5264 Merge pull request #29244 from yuexiao-wang/fix-typos-eg
Fix a bit typos
2016-12-09 16:03:35 +09:00
yuexiao-wang
11454e1c97 Fix a bit typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-12-09 03:05:11 +08:00
Justin Cormack
68a423304e Merge pull request #28924 from xlgao-zju/fix-apparmor-load-profile
fix apparmor load profile
2016-12-08 08:47:27 -08:00
Akihiro Suda
e8a2c7196a Merge pull request #28939 from duglin/HideDupWarnings
Only show global warnings once
2016-12-06 16:12:34 +09:00
Alexander Morozov
8895ee0b4d Merge pull request #29043 from duglin/Issue29014
Fix use of **/ in .dockerignore
2016-12-02 08:34:45 -08:00
Doug Davis
376bb84c5c 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>
2016-12-02 03:58:54 -08:00
Justin Cormack
a756c1ac65 Merge pull request #28996 from Microsoft/jjh/sqlite-remove-windows
Windows: Factor out sqlite
2016-12-01 13:56:11 -08:00
John Howard
3f6127b173 Windows: Factor out sqlite
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-12-01 09:38:08 -08:00
Alexander Morozov
0bf4510a53 Merge pull request #28784 from thaJeztah/add-some-adjectives
Add some adjectives to the namesgenerator
2016-11-30 11:46:56 -08:00
Vincent Demeester
6367c67ab7 Merge pull request #28487 from cpuguy83/stack_dumps
Move stack dump dir to exec root
2016-11-30 20:01:29 +01:00
Doug Davis
ff42a2eb41 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>
2016-11-30 10:11:42 -08:00
Xianglin Gao
2ab8f2e389 fix apparmor load profile
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2016-11-29 15:48:38 +08:00
Sebastiaan van Stijn
169b4d92a1
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>
2016-11-24 18:38:04 +01:00
Tõnis Tiigi
5c1826ec4d Merge pull request #28683 from darrenstahlmsft/SystemDLL
Swap usage of LazyDLL and LoadDLL to LazySystemDLL
2016-11-22 16:58:30 -08:00
Darren Stahl
22c83c567f Swap usage of LazyDLL and LoadDLL to LazySystemDLL.
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-11-22 14:57:11 -08:00
Sebastiaan van Stijn
313502488e Merge pull request #28506 from bfirsh/prepare-api-docs-for-swagger-docs
Prepare docs and Swagger definition for automatically generated API docs
2016-11-22 22:47:38 +01:00
Sebastiaan van Stijn
86eae4018a Merge pull request #28698 from YuPengZTE/devErrot
error strings should not be capitalized or end with punctuation
2016-11-22 21:25:09 +01:00
Tibor Vass
677e14643c Merge pull request #28595 from anusha-ragunathan/plugin_timeout
Allow HTTP client timeout to be configurable on plugin enable.
2016-11-22 10:17:10 -08:00
Ben Firshman
f0d55cd081
Rename Remote API to Engine API
Implementation of https://github.com/docker/docker/issues/28319

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 12:49:38 +00:00
yupeng
fc11efa2db error strings should not be capitalized or end with punctuation
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-11-22 14:53:11 +08:00
yupeng
1e65db4206 First header should be a top level header
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-11-22 09:33:21 +08:00