pkg/libcontainer/nsinit
Alexander Larsson 6b97c80b4d Make /proc writable, but not /proc/sys and /proc/sysrq-trigger
Some applications want to write to /proc. For instance:

docker run -it centos groupadd foo

Gives: groupadd: failure while writing changes to /etc/group

And strace reveals why:

open("/proc/self/task/13/attr/fscreate", O_RDWR) = -1 EROFS (Read-only file system)

I've looked at what other systems do, and systemd-nspawn makes /proc read-write
and /proc/sys readonly, while lxc allows "proc:mixed" which does the same,
plus it makes /proc/sysrq-trigger also readonly.

The later seems like a prudent idea, so we follows lxc proc:mixed.
Additionally we make /proc/irq and /proc/bus, as these seem to let
you control various hardware things.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-05-19 20:46:05 +02:00
..
nsinit "nsinit exec ..." forwards signals to container 2014-05-14 11:01:02 +02:00
create.go Make native driver use Exec func with different CreateCommand 2014-04-30 18:49:24 -07:00
exec.go Move cgroups package into libcontainer 2014-05-14 15:21:44 -07:00
execin.go Improve libcontainer namespace and cap format 2014-05-05 12:34:21 -07:00
init.go Make /proc writable, but not /proc/sys and /proc/sysrq-trigger 2014-05-19 20:46:05 +02:00
pid.go Integrate new structure into docker's native driver 2014-04-30 18:20:01 -07:00
std_term.go Split term files to make it easier to manage 2014-04-30 17:04:24 -07:00
sync_pipe.go Export syncpipe fields 2014-04-30 17:02:45 -07:00
term.go Split term files to make it easier to manage 2014-04-30 17:04:24 -07:00
tty_term.go Split term files to make it easier to manage 2014-04-30 17:04:24 -07:00
unsupported.go Move cgroups package into libcontainer 2014-05-14 15:21:44 -07:00