Commit Graph

441 Commits

Author SHA1 Message Date
0adeca917f Merge pull request #18953 from justincormack/robust_list
Allow use of robust list syscalls in default seccomp policy
Upstream-commit: afdc4747dc16d4302ffd4f5dcb0fc537108862b7
Component: engine
2015-12-29 10:19:41 -08:00
f88929edd0 Merge pull request #18956 from justincormack/umount
Block original umount syscall in default seccomp filter
Upstream-commit: a32b06b067f847ee2cefe104430499c425c8fc2c
Component: engine
2015-12-29 10:19:04 -08:00
42db75c945 Merge pull request #18959 from justincormack/finit_module
Deny finit_module in default seccomp profile
Upstream-commit: ad8bce2ce4e27f7484fc65a3e6b9bf111793a263
Component: engine
2015-12-29 10:12:50 -08:00
00259400b7 Merge pull request #18961 from justincormack/clock_adjtime
Block clock_adjtime in default seccomp config
Upstream-commit: 8ac3d083a856729bc78adad3924e85d73d07173f
Component: engine
2015-12-29 10:08:45 -08:00
d33f2d3ddd Block stime in default seccomp profile
The stime syscall is a legacy syscall on some architectures
to set the clock, should be blocked as time is not namespaced.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 6300a08be905969b16197f6a82a3d0d99a3f99cd
Component: engine
2015-12-29 15:28:05 +00:00
55ebb7bfa4 Block clock_adjtime in default seccomp config
clock_adjtime is the new posix style version of adjtime allowing
a specific clock to be specified. Time is not namespaced, so do
not allow.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 0e5c43cddad304301ca8a82f652e15f75ee68cfe
Component: engine
2015-12-29 12:48:16 +00:00
40aa142ae9 Deny finit_module in default seccomp profile
This is a new version of init_module that takes a file descriptor
rather than a file name.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 0d5306a0b69c912a981f3a4bd41b80beb1207851
Component: engine
2015-12-29 12:31:33 +00:00
e02645b0cd Block original umount syscall in default seccomp filter
The original umount syscall without flags argument needs to
be blocked too.

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 9be0d93cf74d1bb31c401f1154abc773af31cbd6
Component: engine
2015-12-29 11:57:16 +00:00
b5183e0bab Allow use of robust list syscalls
The set_robust_list syscall sets the list of futexes which are
cleaned up on thread exit, and are needed to avoid mutexes
being held forever on thread exit.

See for example in Musl libc mutex handling:
http://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_mutex_trylock.c#n22

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
Upstream-commit: 7b133e7235593f8d46832045da339395e71e8148
Component: engine
2015-12-29 10:22:05 +00:00
bc484831ec fix code comment
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: b4c14a0bb846343c6d6d5dde6d9259c2c62a0b1e
Component: engine
2015-12-28 22:36:54 -08:00
3f03a2c89c add docs and unconfined to run a container without the default seccomp profile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 15674c5fb74df00d7560fb35619a5372ea2ee74e
Component: engine
2015-12-28 10:26:51 -08:00
b5ffb5a2c4 set default seccomp profile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 947293a28084cb5ee2e10e4d128c6e2b9d9da89d
Component: engine
2015-12-28 10:18:47 -08:00
c4af30652d Implemet docker update command
It's used for updating properties of one or more containers, we only
support resource configs for now. It can be extended in the future.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 8799c4fc0feadede6ae60e77bd7d9dfd7cc72a79
Component: engine
2015-12-28 19:19:26 +08:00
1cfbdcfe91 Remove package pkg/ulimit, use go-units instead.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 83237aab2b9430a88790467867505cc9a5147f3e
Component: engine
2015-12-23 13:27:58 -05:00
027f002cb3 Move Config and HostConfig from runconfig to types/container.
- Make the API client library completely standalone.
- Move windows partition isolation detection to the client, so the
  driver doesn't use external types.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 7ac4232e70fe7cf7318333cd0890db7f95663079
Component: engine
2015-12-22 13:34:30 -05:00
b006691148 Replace usage of pkg/nat with go-connections/nat.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 056e7449039af522fa0a1567ef67916eaa0de93e
Component: engine
2015-12-22 13:31:46 -05:00
a04e1f9592 Add support for blkio read/write iops device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 843084b08b521a70baf9284ec4e23e941ab38367
Component: engine
2015-12-21 09:14:49 +08:00
5eac08b5e9 Merge pull request #18395 from LK4D4/default_cgroup_is_not_daemon
Use /docker as cgroup parent instead of docker
Upstream-commit: ff69b23dc09e544fb8ae9dccbd1f7992d2005b70
Component: engine
2015-12-17 13:59:00 -08:00
2a2006ef18 Merge pull request #17034 from rhvgoyal/volume-propagation
Capability to specify per volume mount propagation mode
Upstream-commit: ce0b1841c82b6972d96654e083f813944e72443f
Component: engine
2015-12-15 12:14:41 -05:00
4b93eb25be Merge pull request #18612 from mrunalp/update_runc
Update runc/libcontainer to v0.0.6
Upstream-commit: ecc3717cb17313186ee711e624b960b096a9334f
Component: engine
2015-12-14 13:05:53 -08:00
18aa0ef1ba Merge pull request #18393 from qzio/apparmor/ptrace-ubuntu14
Enable ptrace in a container on apparmor below 2.9
Upstream-commit: c38aa60180792210a21f162a57958bda86f9c381
Component: engine
2015-12-14 10:07:01 -08:00
a9fa7f4c75 Check Propagation properties of source mount point
Whether a shared/slave volume propagation will work or not also depends on
where source directory is mounted on and what are the propagation properties
of that mount point. For example, for shared volume mount to work, source
mount point should be shared. For slave volume mount to work, source mount
point should be either shared/slave.

This patch determines the mount point on which directory is mounted and
checks for desired minimum propagation properties of that mount point. It
errors out of configuration does not seem right.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: d4b4ce2588d02acd3602d42b788c6b36ab9b01e5
Component: engine
2015-12-14 10:39:53 -05:00
c0860c6bed Add capability to specify mount propagation per volume
Allow passing mount propagation option shared, slave, or private as volume
property.

For example.
docker run -ti -v /root/mnt-source:/root/mnt-dest:slave fedora bash

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: a2dc4f79f260247afe55ab7117c9de02a769d883
Component: engine
2015-12-14 10:39:53 -05:00
3c4fcf6b7a Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
Upstream-commit: 927b334ebfc786276a039e45ec097e71bf9a104c
Component: engine
2015-12-13 18:04:12 +02:00
fbb93e6251 Update runc/libcontainer to v0.0.6
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: e8f7d5885dad5364b25a8f1efa8bb6b29afa89b1
Component: engine
2015-12-11 15:24:32 -05:00
f628f2f8be Enable ptrace in a container on apparmor below 2.9
Ubuntu 14.04 LTS is on apparmor 2.8.95.
This enables `ps` inside a container without causing
audit log entries on the host.

Signed-off-by: Joel Hansson <joel.hansson@ecraft.com>
Upstream-commit: 6480feb7668851d3878bf36eedc5fd8ffa789e25
Component: engine
2015-12-07 11:08:49 +01:00
ab6c9709f6 Merge pull request #17989 from jfrazelle/initial-seccomp-support
Phase 1: Initial seccomp support
Upstream-commit: 87a614ed55f2a9076d8150f846b0d27fe60095a8
Component: engine
2015-12-05 08:33:58 -08:00
7be0f9667b Add support for blkio read/write bps device
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Upstream-commit: 3f15a055e5c50d0f08d4c3e7cd9618d537b84f29
Component: engine
2015-12-04 09:26:03 +08:00
4f88ba8722 inital seccomp support
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: 6707f4b9b638b367a1dde6f8684a5b9817a882f0
Component: engine
2015-12-03 16:30:44 -08:00
329ce171d3 Use /docker as cgroup parent instead of docker
It means that containers will be created under root cgroup and not under
daemon cgroup.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 4b55765c11b3ae3bc02385ad17fe2a3c419e71bc
Component: engine
2015-12-03 08:42:45 -08:00
a7b1157339 Merge pull request #16277 from runcom/add-oom-score-adj
Add OomScoreAdj
Upstream-commit: 8f1f53f735e278bb23bb41d9387a75786d7ec1dc
Component: engine
2015-12-02 11:49:51 -08:00
71b21cf347 This patch adds --tmpfs as a option for mounting tmpfs on directories
It will Tar up contents of child directory onto tmpfs if mounted over

This patch will use the new PreMount and PostMount hooks to "tar"
up the contents of the base image on top of tmpfs mount points.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Upstream-commit: b3e527dfd242ad30c0297c8b257862116cf2c50e
Component: engine
2015-12-02 10:06:59 -05:00
d6e4b2d7b7 Merge pull request #18178 from jfrazelle/apparmor-we-meet-again
Fix docker-default profile handing signals
Upstream-commit: e852959fadf7ec77ffb57877806603b8c0bf523e
Component: engine
2015-11-30 11:34:34 -08:00
d3dbad3a43 check version for docker-default aa profile
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: f8db9a09e0ec9b1925839ffff4f1cc5fe3ace630
Component: engine
2015-11-30 10:18:12 -08:00
45a6d40e9f Merge pull request #18303 from runcom/lxc-leftover
daemon: remove sysInitPath, lxc leftover
Upstream-commit: 360a10651188fcf79b0110265c3f2723637e11b7
Component: engine
2015-11-30 09:37:05 -08:00
132ab17e74 Merge pull request #18239 from jfrazelle/17783-fix-regex
Fix parsing of apparmor pcre syntax
Upstream-commit: 377e1d75f93101acbff7cf06df2c05a2df3b6760
Component: engine
2015-11-30 09:15:25 -08:00
ddf1fb3149 Add OomScoreAdj to configure container oom killer preferences
libcontainer v0.0.4 introduces setting `/proc/self/oom_score_adj` to
better tune oom killing preferences for container process. This patch
simply integrates OomScoreAdj libcontainer's config option and adjust
the cli with this new option.

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: d3af7f283d8dc0be67be48e14cd740fbeb690f7a
Component: engine
2015-11-30 11:19:04 +01:00
c116892cdb daemon: remove sysInitPath, lxc leftover
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 1b726b29b21bbc1aebfe0f6b71dfd61145bdd6af
Component: engine
2015-11-30 10:04:13 +01:00
dfeea039e6 Fix kernel memory limit
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: dd7b4fd651a6f9354efb991f6ce547a03729fa18
Component: engine
2015-11-28 09:47:25 +08:00
1fccc71442 Fix parsing of apparmor pcre syntax
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
Upstream-commit: c0f7fdc025da69283eb00d80bf47f4d47eeb0a65
Component: engine
2015-11-25 10:38:18 -08:00
9a375b7073 Adjust docker-default profile when docker daemon is confined
Adjust the docker-default profile for when the docker daemon is running in
AppArmor confinement. To enable 'docker kill' we need to allow the container
to receive kill signals from the daemon.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Upstream-commit: 5cd6b3eca236df06e66777b15932b1a7fbb2e954
Component: engine
2015-11-23 15:20:01 -08:00
12f51add56 Merge pull request #17704 from LK4D4/default_cgroupfs
Use fs cgroups by default
Upstream-commit: c32f8bb36a5f1b2fe0586a1e080c14d8a6b68610
Component: engine
2015-11-19 14:01:13 +01:00
92c9b9e9d4 Use fs cgroups by default
Our implementation of systemd cgroups is mixture of systemd api and
plain filesystem api. It's hard to keep it up to date with systemd and
it already contains some nasty bugs with new versions. Ideally it should
be replaced with some daemon flag which will allow to set parent systemd
slice.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 419fd7449fe1a984f582731fcd4d9455000846b0
Component: engine
2015-11-18 16:16:13 -08:00
1d5287a6dd Merge pull request #16639 from mrunalp/skip_dev_setup
Skip /dev setup in container when it is bind mounted in
Upstream-commit: 91876563052a1d84902e365cbe8b9eaf96846e91
Component: engine
2015-11-17 11:36:00 -08:00
567557144f Merge pull request #18025 from Microsoft/10662-ArgumentEscaping
Windows: Fix docker exec
Upstream-commit: 6f1bc096a64efb592b56dbdefc5bfce1fa7935d3
Component: engine
2015-11-17 11:14:54 +01:00
05e1d2c256 Typo in previous PR processConfig, not c.ProcessConfig
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: d7692b02bdeafc2837bf4269527c2eaa8be254b1
Component: engine
2015-11-16 11:56:01 -08:00
6f1a30b2e2 Merge pull request #17851 from Microsoft/10662-ArgumentEscaping
Prevent double escaping of Dockerfile commands on Windows
Upstream-commit: ad8a66573c61483b9a0721470438dfc8bd01993f
Component: engine
2015-11-14 17:25:53 +01:00
f06cbc085f This fixes the case where arguments are escaped twice from Dockerfiles on
Windows

Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 9db5db1b94bc1000d151315851096dcc6cd3512d
Component: engine
2015-11-13 10:43:06 -08:00
32490eabee Merge pull request #17949 from Microsoft/jjh/cpuweighttp4
Windows: TP4 fix cpu weight
Upstream-commit: 588fedef4af1550f631a71ef1bd98998bc031613
Component: engine
2015-11-12 21:13:09 +01:00
c0d8796b26 Merge pull request #13959 from Mashimiao/add-support-blkio_weight_device
Add support for blkio.weight_device
Upstream-commit: 812a1c149a4a6db09eb59af29bed2713821e696e
Component: engine
2015-11-12 20:42:13 +01:00