Commit Graph

1745 Commits

Author SHA1 Message Date
84681c30e3 Merge pull request #14609 from ewindisch/apparmor-policy
Move AppArmor policy to contrib & deb packaging
Upstream-commit: 380959dd68cd56e60a2ea93cd7f26c8d88135483
Component: engine
2015-07-21 08:48:02 -07:00
74cf202b4f Move AppArmor policy to contrib & deb packaging
The automatic installation of AppArmor policies prevents the
management of custom, site-specific apparmor policies for the
default container profile. Furthermore, this change will allow
a future policy for the engine itself to be written without demanding
the engine be able to arbitrarily create and manage AppArmor policies.

- Add deb package suggests for apparmor.
- Ubuntu postinst use aa-status & fix policy path
- Add the policies to the debian packages.
- Add apparmor tests for writing proc files
Additional restrictions against modifying files in proc
are enforced by AppArmor. Ensure that AppArmor is preventing
access to these files, not simply Docker's configuration of proc.
- Remove /proc/k?mem from AA policy
The path to mem and kmem are in /dev, not /proc
and cannot be restricted successfully through AppArmor.
The device cgroup will need to be sufficient here.
- Load contrib/apparmor during integration tests
Note that this is somewhat dirty because we
cannot restore the host to its original configuration.
However, it should be noted that prior to this patch
series, the Docker daemon itself was loading apparmor
policy from within the tests, so this is no dirtier or
uglier than the status-quo.

Signed-off-by: Eric Windisch <eric@windisch.us>
Upstream-commit: 80d99236c1ef9d389dbaca73c1a949da16b56b42
Component: engine
2015-07-21 11:05:53 -04:00
b04bea4cce golint on daemon/network package
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 7be8336fb54ae2907c8f6549f26272c102a867af
Component: engine
2015-07-21 22:49:49 +08:00
bd707ce47e Merge pull request #14775 from runcom/move-nat-tests
move nat tests from container's unit test to nat's ones
Upstream-commit: 09a3b57f941a9a3c3b7cbc35f2c8d1ff9bcea26f
Component: engine
2015-07-20 20:06:34 -04:00
d803cf51a9 Merge pull request #14691 from Microsoft/10662-start
Windows: hostconfig on start
Upstream-commit: 37d737fc2ceba8d4daa3c3785f6050440a6a40c2
Component: engine
2015-07-21 00:52:19 +02:00
0388c1eb6b move nat tests from container's unit test to nat's ones
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: f2aff584830db5257489bcf76a4b364b79534b77
Component: engine
2015-07-21 00:29:24 +02:00
b70343dc2b Fixing Image struct to no longer use Graph.
Signed-off-by:  John Howard <jhoward@microsoft.com>
Upstream-commit: 9001ea26e7821239207586ad23c78c67d6926bfc
Component: engine
2015-07-20 13:59:53 -07:00
4cbf8e8120 Merge pull request #13681 from tiborvass/carry-11784
Carry 11784: rmi dangling is unsafe when pulling
Upstream-commit: 7f353a11e4d40d08d1bd15df24c87a95d8cd9a02
Component: engine
2015-07-17 16:17:18 -07:00
c4955551ce Merge pull request #11485 from wlan0/rollover_log
Add rollover log driver, and --log-driver-opts flag
Upstream-commit: 415f744d0c5980d332ab54c80f1521a0e5b4d401
Component: engine
2015-07-17 22:41:26 +02:00
8a425b30fb Merge pull request #14693 from LK4D4/update_libcontainer
Update libcontainer
Upstream-commit: 98ed9a55f42f7c86c7c9cddb27f6807e7e77c889
Component: engine
2015-07-17 13:02:04 -07:00
371476f565 fix 8926: rmi dangling is unsafe when pulling
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 1b67c38f6f4a709e1d159445b56f0beee8cfad3a
Component: engine
2015-07-17 11:39:57 -04:00
5fc55316cd devicemapper: Change default basesize to 100G
Current default basesize is 10G. Change it to 100G. Reason being that for
some people 10G is turning out to be too small and we don't have capabilities
to grow it dyamically.

This is just overcommitting and no real space is allocated till container
actually writes data. And this is no different then fs based graphdrivers
where virtual size of a container root is unlimited.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 424d5e55a2f863b8eadab578e3ba647de09a4354
Component: engine
2015-07-17 11:10:23 -04:00
8c0a231700 Merge pull request #14578 from mountkin/fix-rmi-image-not-found
don't allow deleting the image of running containers
Upstream-commit: 15cb7dfc9ecb4600fc514ceef478f8b8ea631b36
Component: engine
2015-07-16 18:02:51 -07:00
d9e652a366 Update libcontainer
Replaced github.com/docker/libcontainer with
github.com/opencontainers/runc/libcontaier.
Also I moved AppArmor profile generation to docker.

Main idea of this update is to fix mounting cgroups inside containers.
After updating docker on CI we can even remove dind.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: c86189d554ba14aa04b6314970d3699e5ddbf4de
Component: engine
2015-07-16 16:02:26 -07:00
d192eb2289 Merge pull request #14620 from hqhq/hq_cgroup_ro_optional
Remove cgroup read-only flag when privileged
Upstream-commit: 8801906cedb73f171a8556294e78d649fee3db32
Component: engine
2015-07-16 16:00:02 -07:00
b49d8006b0 Windows: hostconfig on start
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 39ad38ccf928882171e38c866e61506d1a98508c
Component: engine
2015-07-16 15:33:13 -07:00
1492d5ce64 Update graph to use vendored distribution client for the v2 codepath
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 19515a7ad859b28c474d81e756ac245afcd968e3
Component: engine
2015-07-16 13:13:47 -04:00
c4cef0431e Merge pull request #14604 from Microsoft/10662-addbridge
Windows: Plumb through -b on daemon
Upstream-commit: 97515a35ca4c91f1a1444f73f5fe9385a94f1dd1
Component: engine
2015-07-16 08:44:40 -07:00
fa4cacc2ff don't allow deleting the image of running containers
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: ce6410cd4ccdf3b0d2b9a1bdd0166d4989a88300
Component: engine
2015-07-16 13:14:48 +08:00
89b6e2370a Merge pull request #14661 from LK4D4/vet_warns
Fix some formatting calls
Upstream-commit: cd642973fa50531d3da6c13eb0255b6f4cc8aa9c
Component: engine
2015-07-15 16:41:18 -07:00
46a0415407 Fix some formatting calls
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a5142f6ac31c6c21b96c6895fff525c46e8056a6
Component: engine
2015-07-15 12:25:50 -07:00
9ec8332d92 Fix read-write check for volumes.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 82a54001fdbd3d0c9bcdab1b5caf0a6c6c8079be
Component: engine
2015-07-14 15:50:43 -07:00
b7855d52d5 Merge pull request #13694 from vdemeester/opts-test-coverage
Tests, refactor and coverage on package opts
Upstream-commit: ecdbf868842f702e2b824aa1e11097809d48a659
Component: engine
2015-07-14 15:09:48 -07:00
ca53cad1a3 Remove cgroup read-only flag when privileged
Fixes: #14543

It needs libcontainer fix from:
https://github.com/opencontainers/runc/pull/91

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: a7f5e1c4c3559127758131123242bb54f26da8ce
Component: engine
2015-07-14 15:00:41 +08:00
f00859fc78 Add hostConfig check for MemorySwappiness
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 19c7b65ea600ab77679c9506d762201264dd9a2a
Component: engine
2015-07-14 13:52:57 +08:00
a1ee4d8815 Merge pull request #14021 from rhvgoyal/detect-pool-loopback-devices
devicemapper: Check loop devices of existing pool
Upstream-commit: 5ca3e7c54c9140f2b8553060fdd75d3986e6db6e
Component: engine
2015-07-13 21:15:23 -04:00
4c94e1cdab Merge pull request #10717 from mrunalp/feature/group_add
Adds support for specifying additional groups.
Upstream-commit: 35b02239216d7c976d4b07022429fec25ff9669d
Component: engine
2015-07-13 17:08:05 -07:00
b0b206a336 Merge pull request #14516 from Microsoft/10662-mergeLXCconf
Windows: Tidy up daemon\utils*.go
Upstream-commit: c2b9fa8c9a70be7f4305cf30636d276499980bac
Component: engine
2015-07-13 14:47:25 -06:00
43c3fe4dbf Windows: Plumb through -b on daemon
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: e0ec0cc115a7b271defc7ab5680eb6836ef71c7a
Component: engine
2015-07-13 12:41:48 -07:00
5a8eca0b0b Fixup rebase.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: 7fb456589bee9d98cc7273cae25ae2d7aa743975
Component: engine
2015-07-13 14:50:30 -04:00
b0da7fa04d Adds support for specifying additional groups.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: e0d96fb3ef562103690529c34140d04604599497
Component: engine
2015-07-13 14:47:28 -04:00
0a8f0f82e0 Quieter debug logging for clean exec commands
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b271593c34a67f4040405c952fdb402bf5dcd151
Component: engine
2015-07-13 10:36:36 -07:00
239d35a2bc Merge pull request #14588 from rhatdan/ro
We now support multiple roModes
Upstream-commit: 24c09006c9beedee9c9a54719b6b34d584b3555b
Component: engine
2015-07-13 09:53:55 -04:00
eaf197ed98 Merge pull request #14004 from ktraghavendra/13938_container_swappiness
Add the memory swappiness tuning option to docker.
Upstream-commit: 441ae6c94398dc52a8e6918296b15e6d5b3b4b8e
Component: engine
2015-07-13 09:22:08 -04:00
2f5df0962e We now support multiple roModes
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: b28d6eaa94e994e7102df94ceb13a3fb6c53ab59
Component: engine
2015-07-13 09:19:15 -04:00
22ed49846c Add test coverage to opts and refactor
- Refactor opts.ValidatePath and add an opts.ValidateDevice
  ValidePath will now accept : containerPath:mode, hostPath:containerPath:mode
  and hostPath:containerPath.
  ValidateDevice will have the same behavior as current.

- Refactor opts.ValidateEnv, opts.ParseEnvFile
  Environment variables will now be validated with the following
  definition :
  > Environment variables set by the user must have a name consisting
  > solely of alphabetics, numerics, and underscores - the first of
  > which must not be numeric.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: dfc6c04fa3f7dcb0e78e9dd5e8e4dd285b98546d
Component: engine
2015-07-12 10:33:30 +02:00
11e2c4a554 Add the memory swappiness tuning option to docker.
Memory swappiness option takes 0-100, and helps to tune swappiness
behavior per container.
For example, When a lower value of swappiness is chosen
the container will see minimum major faults. When no value is
specified for memory-swappiness in docker UI, it is inherited from
parent cgroup. (generally 60 unless it is changed).

Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Upstream-commit: 921da495d24695dda66d3f58e78887dd0bc2402e
Component: engine
2015-07-12 13:16:33 +05:30
975b53b7ee Windows: Move daemon check back centrally
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 62a75fca689d235276a6aeaa91a5230de522a3f1
Component: engine
2015-07-11 12:42:46 -07:00
e92413dd0d Merge pull request #14371 from Microsoft/10662-graphdriver
Windows: Graph driver implementation
Upstream-commit: 4aeb84612f530d01e0b4f5b3fff40d2a6978f6f4
Component: engine
2015-07-10 15:35:00 -07:00
9f9bda0c57 Merge pull request #13669 from ewindisch/readonly-proc
Make /proc, /sys, & /dev readonly for readonly containers
Upstream-commit: 703248da20566f707b8290662805a9264629e2e0
Component: engine
2015-07-10 15:32:13 -07:00
1296feade8 Windows: Graph driver implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 52f4d09ffb376ffaa6677cb1e0413c6a97f53f24
Component: engine
2015-07-10 14:33:11 -07:00
576b45a55d Merge pull request #13554 from Microsoft/10662-winexec
Windows: The real Windows exec driver is here.
Upstream-commit: b7e8169274ba4b897601e1025b91ebd361902213
Component: engine
2015-07-10 17:13:10 -04:00
c3450bd95b Windows: Exec driver
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 9ae9d4c87af8b04eb80006aca9f760ffdb1052bb
Component: engine
2015-07-10 13:36:56 -07:00
3a1c206f9b Merge pull request #14306 from Microsoft/validatepsfilter
Validate status= filter to docker ps
Upstream-commit: 20ac0e61643ec185052b8f29272aba1e95be76ec
Component: engine
2015-07-10 15:43:01 -04:00
c770b13f1f Add cgroup bind mount by default
Libcontainer already supported mount container's own cgroup into
container, with this patch, we can see container's own cgroup info
in container.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: f18fb5b3efd59d54c00d4e1b1d4b88c4b21e96be
Component: engine
2015-07-10 13:12:09 +08:00
ea5024ff23 Windows: Tidy up daemon\utils*.go
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 3875be9830af55731251cd3d98d71e7fdb73f223
Component: engine
2015-07-09 18:47:32 -07:00
8595d62a4c Windows: Fix docker info not to SIGSEGV
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4348ad68f818ed72752bcf66d30f53cf15598bb4
Component: engine
2015-07-09 16:37:54 -07:00
18d3d40382 Merge pull request #14476 from crosbymichael/execid-growth-fix
Prevent uncontrolled exec config growth
Upstream-commit: 382799a64253a1da46613a2290a2f59d02710df8
Component: engine
2015-07-09 15:36:11 -07:00
e0ffc7b501 Use mark and sweep for exec command removal
This takes the final removal for exec commands in two steps.  The first
GC tick will mark the exec commands for removal and then the second tick
will remove the config from the daemon.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 34ab8c432691934745d66ee94ff4aec1120518e0
Component: engine
2015-07-09 14:51:10 -07:00
c104f21d9a Merge pull request #14484 from LK4D4/check_dockerinit_lxc
Check dockerinit only if lxc driver is used
Upstream-commit: c9e2a71509743ea38baafb71d7efa8b205af14b4
Component: engine
2015-07-09 14:47:03 -07:00