Commit Graph

23715 Commits

Author SHA1 Message Date
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
Vincent Demeester 1d9a6833d3 Merge pull request #22063 from graingert/patch-1
Fix security documentation, XSS -> CSRF
2016-04-15 14:43:18 +02:00
Thomas Grainger ea8f9c9723
Fix security documentation, XSS -> CSRF
Signed-off-by: Thomas Grainger <tagrain@gmail.com>
2016-04-15 11:29:37 +01:00
Vincent Demeester 172ca1ca8c Merge pull request #20924 from Microsoft/10662-CPUResourceControls
Add CPU count and maximum resource controls for Windows
2016-04-15 08:14:59 +02:00
Vincent Demeester bc0c8828e9 Merge pull request #21172 from yongtang/20909-seccomp-in-docker-info
Show "seccomp" in docker info (#20909).
2016-04-15 01:24:54 +02:00
Darren Stahl ea8c690886 Add CPU count and maximum resource controls for Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
2016-04-14 15:40:25 -07:00
Vincent Demeester 8011228b53 Merge pull request #21634 from cpuguy83/add_beter_logging_for_TestDaemonNoSpaceleftOnDeviceError
More logs for `TestDaemonNoSpaceleftOnDeviceError`
2016-04-14 22:06:49 +02:00
Sebastiaan van Stijn 1a87a21053 Merge pull request #21861 from jfrazelle/apparmor-examples-for-the-apparmor-gods
Add example to apparmor docs
2016-04-14 21:48:02 +02:00
Tibor Vass 18c3869831 Merge pull request #22040 from thaJeztah/bump-version-to-v1.12.0-dev
Bump version to v1.12.0-dev
2016-04-14 15:29:07 -04:00
David Calavera 9e4b5e06f0 Merge pull request #22022 from AkihiroSuda/fixunused
Clean up unused code
2016-04-14 12:21:47 -07:00
Jess Frazelle 80d63e2e11
Add example to apparmor docs
Signed-off-by: Jess Frazelle <jess@mesosphere.com>
2016-04-14 10:59:47 -07:00
David Calavera 6472a6d9e5 Merge pull request #22047 from ncopa/fix-build-from-tarball
Fix detection of git commit during build from tarball
2016-04-14 10:42:45 -07:00
Brian Goff 51be6c4f18 Merge pull request #22038 from thaJeztah/cherry-pick-changelog
Update changelog in master
2016-04-14 12:04:40 -04:00
Vincent Demeester d4b5abaf62 Merge pull request #22044 from thaJeztah/move-filter-options-to-right-api-version
Move volume filters to API 1.24 docs
2016-04-14 17:52:08 +02:00
Natanael Copa 355ad33087 Fix detection of git commit during build from tarball
Distro packagers will often use the tarball to build a package and have
the build script for the package in git. To avoid that the docker build
script picks up the git commit from the distro repo we also check for a
directory named .git before check for -unsupported builds.

Signed-off-by: Natanael Copa <natanael.copa@docker.com>
2016-04-14 17:30:18 +02:00
Sebastiaan van Stijn 8ef76f779d
Move volume filters to API 1.24 docs
This feature was added after the 1.11 code-freeze,
so will be part of the 1.12 release. Moving it to the
right API version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 17:12:28 +02:00
Vincent Demeester 900f06ae3a Merge pull request #22039 from senk/remove-cfengine-docs
Remove docs for cfengine
2016-04-14 16:00:09 +02:00
Sebastiaan van Stijn 7429a740cd
Bump version to v1.12.0-dev
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:22:18 +02:00
Robin Naundorf 297d6c04a3 closes #11703 closes #11560
Signed-off-by: Robin Naundorf <r.naundorf@fh-muenster.de>
2016-04-14 15:21:07 +02:00
Tibor Vass 6cc2bad7f4
Fix some CHANGELOG entries
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 2535db86781f2731024c945ecabd59199de0c727)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:15:23 +02:00
Santhosh Manohar 17bce424d6
Update Networking changelog for 1.11
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
(cherry picked from commit 2153d9ec9d32b882be929a79997c326d516fc44a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:15:09 +02:00
Sebastiaan van Stijn d53e136a2b
Minor fixes to changelog
Some fixes in the changelog were not regressions
since 1.10.x, but only present in 1.11 release candidates
so don't need to be mentioned for the release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 99589731ac1e5d901436e6d0d8c03e9eddb5cccc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:14:53 +02:00
Kenfe-Mickael Laventure bcb7649c3c
Update CHANGELOG.md
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c774c390b199ef59079cd1dc95260d1672625e50)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:14:40 +02:00
Sebastiaan van Stijn b7f9856a36
Update CHANGELOG.md
hardware signing was put back to experimental due to packaging issues
(https://github.com/docker/docker/pull/21499)

add missing "--quiet" option for docker load

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 32a5308237858cc5b7bcac16cc16286fc7996a9b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:14:23 +02:00
John Howard 932e586314
Verify binaries in changelog
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 76489af40f40385b3fd9f0a669fdc8cf3640e188)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:14:05 +02:00
Kenfe-Mickael Laventure 9f3f96220d
Add initial changelog for 1.11.0
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit e651c1b2b92ccfcf3b075999e2427773a9b3dbdf)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-14 15:13:47 +02:00
Akihiro Suda d231260868 Clean up unused code
Signed-off-by: Akihiro Suda <suda.kyoto@gmail.com>
2016-04-14 07:04:10 +00:00
Alexander Morozov cb87b6eb6a Merge pull request #21879 from WeiZhang555/fix-kill-nonexist
Fix bug that can't kill an restarting container
2016-04-13 22:50:19 -07:00
Alexander Morozov 7cd420d63a Merge pull request #21970 from cpuguy83/use_cached_path_on_ls
Fix N+1 calling `Path()` on `volume ls`
2016-04-13 22:47:53 -07:00
Alexander Morozov 37f5caf8c5 Merge pull request #22013 from tonistiigi/fix-go16-panic
Fix panic on winsize syscall
2016-04-13 22:11:13 -07:00
Tonis Tiigi 4d4ef98326 Fix panic on winsize syscall
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-04-13 17:08:00 -07:00
Tibor Vass 7268eb97bc Bump Go version to 1.5.4/1.6.1 (security fix) (#21978)
Go 1.6.1 is for ppc64le only.

https://groups.google.com/forum/#!msg/golang-announce/9eqIHqaWvck/kXsfO0ogLAAJ

Dockerfile.armhf cannot currently be updated.

Signed-off-by: Tibor Vass <tibor@docker.com>
2016-04-13 11:22:48 -07:00
Brian Goff d954097c0b Merge pull request #21953 from Microsoft/jjh/containerapipostcontainerstop
Windows: Fix deamon deadlock in docker stop
2016-04-13 13:28:59 -04:00
Tõnis Tiigi 73ac6d199c Move build endpoint handler from daemon (#21972)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-04-13 10:21:00 -07:00
John Starks 6f8878872f Windows: Fix Hyper-V container ACLs for TP5 (#21974)
In TP5, Hyper-V containers need all image files ACLed so that the virtual
machine process can access them. This was fixed post-TP5 in Windows, but
for TP5 we need to explicitly add these ACLs.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-04-13 10:15:38 -07:00
Thomas Gazagnaire 44fe649c2e Graphdriver docs (#22003)
* Fix closing strings in graphdriver plugin documentation

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>

* Fix documenation for Err type in graphdriver plugins

Fix https://github.com/docker/go-plugins-helpers/issues/24

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>

* Add missing MountLabel argument in graphdriver plugin documentation

The real `Create` seems also to take more arguments (the `storageOpt`) which
are not exposed to the plugin API (yet?).

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>

* Add missing CreateReadWrite in graphdriver plugin documentation

Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
2016-04-13 10:11:39 -07:00
Vincent Demeester 988508a2b5 Merge pull request #19265 from rhatdan/netsysctl
Add support for setting sysctls
2016-04-13 18:36:30 +02:00
Alexander Morozov 9333042ba1 Merge pull request #21942 from tiborvass/fix-21808
vendor runc to fix issue#21808
2016-04-13 08:24:20 -07:00
Sebastiaan van Stijn 78729487cd Merge pull request #21963 from moxiegirl/21701-issue-fix
Update for device mapper configuration
2016-04-13 17:19:16 +02:00
Mary Anthony 783ebebff4 Fixes #21701 devicemapper docs
Copy edit the content
Updates to existing material
Adding mbentley's comments
Updating with last minute comments
Update with Seb's comments

Signed-off-by: Mary Anthony <mary@docker.com>
2016-04-13 08:02:16 -07:00
Tibor Vass 1687f77db2 Merge pull request #21994 from thaJeztah/update-binary-installation
docs: update installation from binaries for 1.11
2016-04-13 09:26:52 -04:00
Sebastiaan van Stijn f5336c7370
docs: update installation from binaries for 1.11
Binaries are now distributed as a '.tgz' or '.zip'
archive, and contain multiple binaries for Linux.

This updates the instructions for 1.11.

Also mention that the Windows 64-bit binary
actually can be used as a daemon. Given that
this is still in beta, no instructions were
added for *running* a daemon on Windows.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-13 15:26:03 +02:00
Vincent Demeester edfe4e9fba Merge pull request #21885 from triccardi-systran/20612-improve-build-cache-miss-documentation
Improve build cache miss doc for `ARG` and `RUN`
2016-04-13 15:23:14 +02:00
Thomas Riccardi 82f5ef2d25 Improve build cache miss doc for `ARG` and `RUN`
The documentation already says the cache miss happens only at `ARG`
variable usage, not declaration, but there is a very common implicit
usage: `RUN`, which this commit documents even more, improving on #21790.

Also, use `definition` instead of `declaration`: it's the same thing, and
`definition` is already used in this documentation, contrary to
`declaration`.

Also, distinguish between "instructions" and "variables defined by `ARG`
instructions".

Signed-off-by: Thomas Riccardi <riccardi@systran.fr>
2016-04-13 15:02:09 +02:00
Vincent Demeester f5d3f528fd Merge pull request #21965 from aboch/doc
Update /containers/create remote API docs
2016-04-13 12:56:40 +02:00
Tibor Vass 348d902768 Merge pull request #21959 from coolljt0725/fix_21957
Fix docker load progressbar, fixes #21957
2016-04-13 00:31:27 -04:00
Lei Jitang 96d7db665b Fix docker load progressbar, fixes #21957
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-04-12 22:45:42 -04:00
Brian Goff 40502e3813 Merge pull request #21949 from aaronlehmann/vendor-distribution-1622
Vendor distribution to correct config blob media type in schema2 manifest
2016-04-12 21:23:22 -04:00
John Howard d691b4af18 Windows: Timeout TestContainerApiPostContainerStop
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-04-12 18:21:54 -07:00
Aaron Lehmann fa4fea3233 Merge pull request #21337 from yongtang/21247-TestRunAttachFailedNoLeak
Flaky test: TestRunAttachFailedNoLeak (#21247)
2016-04-12 17:40:16 -07:00