Commit Graph

24 Commits

Author SHA1 Message Date
bc9024a72e Merge pull request #6097 from timthelion/consistentdevices
Refactor device handling code
Upstream-commit: 0ef637722f69cff931b25c75d421e231ab75af75
Component: engine
2014-05-31 03:34:52 +03:00
52c8a31f21 Refactor device handling code
We now have one place that keeps track of (most) devices that are allowed and created within the container.  That place is pkg/libcontainer/devices/devices.go

This fixes several inconsistencies between which devices were created in the lxc backend and the native backend.  It also fixes inconsistencies between wich devices were created and which were allowed.  For example, /dev/full was being created but it was not allowed within the cgroup.  It also declares the file modes and permissions of the default devices, rather than copying them from the host.  This is in line with docker's philosphy of not being host dependent.

Docker-DCO-1.1-Signed-off-by: Timothy Hobbs <timothyhobbs@seznam.cz> (github: https://github.com/timthelion)
Upstream-commit: 608702b98064a4dfd70b5ff0bd6fb45d2429f45b
Component: engine
2014-05-30 19:21:29 +00:00
ea766a12d8 Merge pull request #5868 from jhspaybar/5749-libcontainerroutes
libcontainer support for arbitrary route table entries
Upstream-commit: 5e2af0713735d6724179540d4d1b0827ab8c4570
Component: engine
2014-05-28 10:50:56 -07:00
fc7b9b154d Fixes #5749
libcontainer support for arbitrary route table entries

Docker-DCO-1.1-Signed-off-by: William Thurston <me@williamthurston.com> (github: jhspaybar)
Upstream-commit: bf7f360dcac38037d5c4f9e2e90d01adc240ed2b
Component: engine
2014-05-28 17:42:02 +00:00
cb5e9c4323 update test
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: b6c65df093111072bb44d42d650b591adb1bbbe0
Component: engine
2014-05-22 22:50:41 +00:00
37f08c7066 Update code post codereview
Add specific types for Required and Optional DeviceNodes
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: f042c3c15759fce5cc139f2b3362b791ac7d4829
Component: engine
2014-05-21 00:40:41 +00:00
ada6c057b6 Mount /dev in tmpfs for privileged containers
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 34c05c58c8d41ee2bb02cd8059e9928ee2f061ea
Component: engine
2014-05-20 22:51:24 +00:00
e3742d2641 Make libcontainer's CapabilitiesMask into a []string (Capabilities).
Docker-DCO-1.1-Signed-off-by: Victor Marmol <vmarmol@google.com> (github: vmarmol)
Upstream-commit: 92614928cecd48b241011e614fa856c4fdbac1f6
Component: engine
2014-05-17 00:44:10 +00:00
41f42a620b Improve libcontainer namespace and cap format
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: db5f6b4aa0b34adbc9ba189a042e77e7bcdee681
Component: engine
2014-05-05 12:34:21 -07:00
d33d261bde drop CAP_SYSLOG capability
Kernel capabilities for privileged syslog operations are currently splitted into
CAP_SYS_ADMIN and CAP_SYSLOG since the following commit:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=ce6ada35bdf710d16582cc4869c26722547e6f11

This patch drops CAP_SYSLOG to prevent containers from messing with
host's syslog (e.g. `dmesg -c` clears up host's printk ring buffer).

Closes #5491

Docker-DCO-1.1-Signed-off-by: Eiichi Tsukata <devel@etsukata.com> (github: Etsukata)
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: cac0cea03f85191b3d92cdaeae827fdd93fb1b29
Component: engine
2014-05-01 11:43:55 -07:00
bccf8f7f86 Update container.json and readme
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 2d31aeb911fc94baa88f975110c5ccd45d041acb
Component: engine
2014-04-24 10:35:20 -07:00
ba77c9041d refactor(libcontainer): rename to CapabilitiesMask
The Capabilities field on libcontainer is actually used as a mask.
Rename the field so that this is more clear.

Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
Upstream-commit: 128381e0f0372f10f88a847087aa91a972770c4b
Component: engine
2014-03-17 11:07:12 -07:00
3258d9a2a3 Make network a slice to support multiple types
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 70820b69ec2b82ab150af9b8829e37843f67f75a
Component: engine
2014-02-26 14:20:41 -08:00
5eca2c008a Refactor network creation and initialization into strategies
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 5a4069f3aacd0dc30ee7c5dd97f0dc9a6e416f35
Component: engine
2014-02-21 22:26:07 -08:00
8be796c4b1 Move tty into container.json
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 7f247e7006761ac8922a58651a76b194a4655ffa
Component: engine
2014-02-21 14:56:17 -08:00
9aba82e1b2 Change IP to address because it includes the subnet
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 3cb698125da7b55a7d7ec43b33858f35844a6143
Component: engine
2014-02-21 14:56:16 -08:00
680db4b285 Refactory cgroups into general pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: c44258630575f70231b11fb55bc4edc3fb677cab
Component: engine
2014-02-21 14:56:16 -08:00
d2ac05db40 libcontainer: Initial version of cgroups support
This is a minimal version of raw cgroup support for libcontainer.
It has only enough for what docker needs, and it has no support
for systemd yet.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 664fc54e65ebc14ca9dd5bfc55e3dfe1796e51c8
Component: engine
2014-02-21 14:56:16 -08:00
e501c61ed3 Refactor to remove cmd from container
Pass the container's command via args
Remove execin function and just look for an
existing nspid file to join the namespace
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: d84feb8fe5e40838c81321249189f1f0a02825bb
Component: engine
2014-02-21 14:56:16 -08:00
eba71238f8 Add execin function to running a process in a namespace
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 420b5eb211f877baac9622e7bedde2948c043619
Component: engine
2014-02-21 14:56:16 -08:00
ec270e1bfb Refactor large funcs
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 5d62916c48cb97320b37640592805d97badfd8ff
Component: engine
2014-02-21 14:56:16 -08:00
3f67fdb8ed Implement init veth creation
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 34671f20103fb975fed31a03705e04bc65aed239
Component: engine
2014-02-21 14:56:15 -08:00
0ffa3c9f04 Improve general quality of libcontainer
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
Upstream-commit: 93d41e53ae64fd77340c31d3bc5531864ed28779
Component: engine
2014-02-21 14:56:15 -08:00
a326ecddb8 Initial commit of libcontainer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: e8abaf217b887fcd6a157b4f905156bd245f8f0a
Component: engine
2014-02-21 14:56:15 -08:00