Commit graph

23836 commits

Author SHA1 Message Date
Vincent Demeester
7534f17261
Update code for latest engine-api
- Update CopyToContainer uses
- Use engine-api/types/versions instead of pkg/version

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-04-19 16:56:54 +02:00
Vincent Demeester
04bb3a2f45
Vendoring engine-api to a2999dbd3471ffe167f2aec7dccb9fa9b016dcbc
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-04-19 15:50:20 +02:00
Sebastiaan van Stijn
68f9a45440
Remove API versions 1.17 and older from documentation
Docker 1.5 and older is no longer supported by Docker Hub,
so there's not much need to document the API for those
versions.

Documentation is still available on GitHub, and through
the older versions of the documentation for those
that really need it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-19 14:39:14 +02:00
Brian Goff
8adc8c3a68 Merge pull request #21901 from mavenugo/sid
Add container's short-id as default network alias
2016-04-19 08:16:41 -04:00
Brian Goff
42a7efd691 Merge pull request #22122 from Microsoft/jjh/defaultdir
Windows: Set default directory
2016-04-19 07:27:13 -04:00
Vincent Demeester
9534a8220c Merge pull request #22135 from yongtang/22100-docs-container-creation-param
Docs: Container creation param descriptions not under HostConfig
2016-04-19 12:17:22 +02:00
Yong Tang
332e3b545b Docs: Container creation param descriptions not under HostConfig
This fix tries to fix issues mentioned in #22100 for incorrect
description of remote API's container creation params.

Several issues have been fixed:
1. CPU and memory related params (e.g., `MemorySwap`, `CpuShares`, etc.)
were incorrectly placed under the top level instead of under the HostConfig.
(v1.18-v1.24)
2. The param `Cpuset` has been deprecated but was never removed.
(v1.18-v1.24)
3. The param `PidsLimit` was not added even though the description
has been added.
(v1.23-v1.24)

This fix fixes #22100

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-04-18 21:15:33 -07:00
David Calavera
7fd53f7c71 Merge pull request #21657 from vdemeester/update-engine-api
Update engine api with required arguments
2016-04-18 19:47:22 -07:00
David Calavera
aeb1e45e60 Merge pull request #22130 from Microsoft/jstarks/win_pidfile
Windows: don't overwrite PID file if process exists
2016-04-18 19:45:18 -07:00
John Starks
9e5b93565c Windows: don't overwrite PID file if process exists
pidfile.New() was opening a file in /proc to determine if the owning
process still exists. Use syscall.OpenProcess() on Windows instead.

Other OSes may also need to be updated here.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-04-18 16:41:37 -07:00
Michael Crosby
eed9c930b8 Merge pull request #22120 from crosbymichael/stats-panic
Create a copy of stats value before modifications
2016-04-18 16:26:23 -07:00
John Howard
c2d183426b Windows: Set default directory
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-04-18 15:59:41 -07:00
Alexander Morozov
2b5512a3be Merge pull request #22080 from amitkris/pkg_term_solaris
Get pkg/term to build for Solaris
2016-04-18 15:04:24 -07:00
Alexander Morozov
7f767d8ff5 Merge pull request #22069 from rhvgoyal/overlay-private
Make overlay home dir Private mount
2016-04-18 14:56:34 -07:00
Vivek Goyal
e076bccb45 Make overlay home dir Private mount
People have reported following issue with overlay

$ docker run -ti --name=foo -v /dev/:/dev fedora bash
$ docker cp foo:/bin/bash /tmp
$ exit container

Upon container exit, /dev/pts gets unmounted too. This happens because
docker cp volume mounts get propagated to /run/docker/libcontainer/....
and when container exits, it must be tearing down mount point under
/run/docker/libcontainerd/... and as these are "shared" mounts it
propagates events to /dev/pts and it gets unmounted too.

One way to solve this problem is to make sure "docker cp" volume mounts
don't become visible under /run/docker/libcontainerd/..

Here are more details of what is actually happening.

Make overlay home directory (/var/lib/docker/overlay) private mount when
docker starts and unmount it when docker stops. Following is the reason
to do it.

In fedora and some other distributions / is "shared". That means when
docker creates a container and mounts it root in /var/lib/docker/overlay/...
that mount point is "shared".

Looks like after that containerd/runc bind mounts that rootfs into
/runc/docker/libcontainerd/container-id/rootfs. And this puts both source
and destination mounts points in shared group and they both are setup
to propagate mount events to each other.

Later when "docker cp" is run it sets up container volumes under
/var/lib/dokcer/overlay/container-id/... And all these mounts propagate
to /runc/docker/libcontainerd/... Now mountVolumes() makes these new
mount points private but by that time propagation already has happened
and private only takes affect when unmount happens.

So to stop this propagation of volumes by docker cp, make
/var/lib/docker/overlay a private mount point. That means when a container
rootfs is created, that mount point will be private too (it will inherit
property from parent). And that means when bind mount happens in /runc/
dir, overlay mount point will not propagate mounts to /runc/.

Other graphdrivers like devicemapper are already doing it and they don't
face this issue.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2016-04-18 21:48:09 +00:00
Madhu Venugopal
ea531f061d Add container's short-id as default network alias
link feature in docker0 bridge by default provides short-id as a
container alias. With built-in SD feature, providing a container
short-id as a network alias will fill that gap.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-04-18 14:45:16 -07:00
Tonis Tiigi
84d170129a Clean up exec fifos on process exit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-04-18 14:03:37 -07:00
Tianon Gravi
c3533d58c3 Merge pull request #22029 from talex5/gitcommit
Build: pass through DOCKER_GITCOMMIT
2016-04-18 12:46:09 -07:00
Alexander Morozov
1cd7dd8917 Merge pull request #22082 from tiborvass/revert-go-security-fix-for-windows
Workaround Windows bug discovered with Go security fix
2016-04-18 12:44:13 -07:00
Alexander Morozov
2b6d7f728e Merge pull request #22088 from amitkris/update_fsnotify
Update fsnotify to v1.2.11
2016-04-18 12:38:29 -07:00
Brian Goff
4e898ae64b Merge pull request #22065 from thaJeztah/remove-deprecation-message
Remove deprecation warning
2016-04-18 15:29:05 -04:00
Michael Crosby
d17ee4b506 Create a copy of stats value before modifications
Fixes #22030

Because the publisher uses this same value to all the
stats endpoints we need to make a copy of this as soon as we get it so
that we can make our modifications without it affecting others.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-04-18 11:41:38 -07:00
Brian Goff
a4030787f5 Merge pull request #21993 from coolljt0725/quiet_restartmanger_cancel
Don't throw "restartmanager canceled" error for no restart policy container
2016-04-18 14:38:01 -04:00
Sebastiaan van Stijn
dadc3087e3 Merge pull request #22058 from WeiZhang555/remove-rpc-error
Remove rpc error when shut down daemon
2016-04-18 20:25:14 +02:00
Vincent Demeester
ac7e011ec9 Merge pull request #22048 from thaJeztah/docs-update-api-for-labels
docs: update API for features added in 1.11
2016-04-18 18:21:38 +02:00
Vincent Demeester
e764e0215e Merge pull request #22086 from aboch/doc
Clarify container external connectivity in multi-network scenario
2016-04-18 18:16:51 +02:00
Sebastiaan van Stijn
e68765d5e2 Merge pull request #22115 from yorkie/fix/doc-typo
doc: fix typo
2016-04-18 18:09:28 +02:00
yorkie
d2c5bf23f1 doc: fix typo
Signed-off-by: yorkie <yorkiefixer@gmail.com>
2016-04-18 23:42:33 +08:00
Alessandro Boch
c2e088e134 Clarify container external connectivity in multi-network scenario
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-04-18 08:39:40 -07:00
Vincent Demeester
9b6c055f92 Merge pull request #22098 from thaJeztah/cherry-pick-21998
cherry-pick "runc install path changed from /usr/local/bin to /usr/local/sbin"
2016-04-18 11:09:55 +02:00
Vincent Demeester
bbf3c0251d Merge pull request #22097 from mavenugo/tp5
Vendoring libnetwork v0.8.0-dev.1
2016-04-18 07:51:54 +02:00
Kai Qiang Wu(Kennan)
f812b55692 Add network label filter support
This patch did following:

1) Make filter check logic same as `docker ps ` filters

Right now docker container logic work as following:
when same filter used like below:
 -f name=jack -f name=tom
it would get all containers name is jack or tom(it is or logic)

when different filter used like below:

 -f name=jack -f id=7d1
it would get all containers name is jack and id contains 7d1(it is and logic)

It would make sense in many user cases, but it did lack of compliate filter cases,
like "I want to get containers name is jack or id=7d1", it could work around use
(get id=7d1 containers' name and get name=jack containers, and then construct the
final containers, they could be done in user side use shell or rest API)

2) Fix one network filter bug which could include duplicate result
when use -f name=  -f id=, it would get duplicate results

3) Make id filter same as container id filter, which means match any string.
not use prefix match.

It is for consistent match logic

Closes: #21417

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2016-04-18 00:38:48 +00:00
Madhu Venugopal
b1459f1b94 Vendoring libnetwork v0.8.0-dev.1
- Fixes docker/docker#16964
- Added maximum egress bandwidth qos for Windows

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-04-17 11:17:48 -07:00
Tibor Vass
cbb6c6e959
runc install path changed from /usr/local/bin to /usr/local/sbin
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 3d85e51ef4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-17 01:36:53 +02:00
Sebastiaan van Stijn
2a95488f78 Merge pull request #22085 from thaJeztah/remove-unused-query-parameter
docs: remove unused "registry" parameter
2016-04-16 17:39:04 +02:00
Vincent Demeester
27dd6a10b8 Merge pull request #21817 from tkopczynski/20784-builder-dockerfile-support
Unit tests for builder/dockerfile/support
2016-04-16 13:34:35 +02:00
Doug Davis
5314296c69 Merge pull request #20835 from cpuguy83/handle_stats_client_errors
Do not remove containers from stats list on err
2016-04-16 10:20:58 +01:00
Zhang Wei
a02ae66d36 Remove rpc error when shut down daemon
RPC connection closing error will be reported every time we shutdown
daemon, this error is expected, so we should remove this error to avoid
confusion to user.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-04-16 16:53:33 +08:00
Amit Krishnan
ae75a7d3b2 Update fsnotify to v1.2.11
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-04-15 18:40:07 -07:00
Tibor Vass
3b3e58b639 Workaround Windows bug discovered with Go security fix
For context: https://github.com/golang/go/issues/15286

This commit downloads go1.5.3 in addition to go1.5.4 in order to
workaround the issue.

It is not expected to do a Docker release without a proper fix, however
this should help unblock Docker development on Windows TP5.

Signed-off-by: Tibor Vass <tibor@docker.com>
2016-04-15 21:00:45 -04:00
Sebastiaan van Stijn
ba353f3787 docs: update API for features added in 1.11
Docker 1.11 added a feature to set labels on volumes,
networks and images (during build), but these changes
were not documented in the API documentation.

This adds the new features to the documentation.

Also fixes some minor formatting, and options that
were not used in the examples.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-16 02:27:52 +02:00
Sebastiaan van Stijn
e035a86c1d
docs: remove unused "registry" parameter
The "registry" query-param was in added 10c0e99037,
and removed in docker 0.5.0 via 66a9d06d9f.

Aparently, it was never removed from the documentation,
and included in all versions of the API docs.

This removes it from the documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-16 02:09:58 +02:00
Tomasz Kopczynski
d0ebc58b9c Unit tests for builder/dockerfile/support
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
2016-04-16 00:19:58 +02:00
Amit Krishnan
b216dc9115 Get pkg/term to build for Solaris
Signed-off-by: Amit Krishnan <krish.amit@gmail.com>
2016-04-15 14:18:26 -07:00
Brian Goff
7bfa122472 Merge pull request #22078 from yongtang/04152016-docs-remote-api-SecurityOpt
Fix incorrect docs in remote API for the option of `SecurityOpt`
2016-04-15 15:47:50 -04:00
Brian Goff
19a453e6b4 Merge pull request #21939 from calavera/events_until_past
Get events until a time in the past.
2016-04-15 15:33:41 -04:00
David Calavera
714cd6bd8f Merge pull request #22079 from allencloud/fix-typos-in-CHANGELOG
fix typos in changelog
2016-04-15 11:42:03 -07:00
David Calavera
caf21c81ff Merge pull request #22066 from thaJeztah/fail-on-unsupported-kernels
Produce fatal error when running on kernel < 3.10.0
2016-04-15 11:41:31 -07:00
allencloud
57f29f24e4 fix typos in changelog
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-04-16 02:19:15 +08:00
Yong Tang
f3f981624b Fix incorrect docs in remote API for the option of SecurityOpt
This fix tries to fix the issue in remote API docs for v1.15 (Docker 1.3.x)
and v1.16 (Docker 1.4.x) where `SecurityOpts` was used but the actual field
should be `SecurityOpt`.

This `SecurityOpt` field is verified through the source code in
v1.3.0 and v1.4.0:
https://github.com/docker/docker/blob/v1.3.0/runconfig/config.go#L35
https://github.com/docker/docker/blob/v1.4.0/runconfig/hostconfig.go#L98

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-04-15 11:08:15 -07:00