an [abandoned] attempt to slice out the docker/docker/pkg package
Find a file
Jérôme Petazzoni a5364236a7 Mount /proc and /sys read-only, except in privileged containers.
It has been pointed out that some files in /proc and /sys can be used
to break out of containers. However, if those filesystems are mounted
read-only, most of the known exploits are mitigated, since they rely
on writing some file in those filesystems.

This does not replace security modules (like SELinux or AppArmor), it
is just another layer of security. Likewise, it doesn't mean that the
other mitigations (shadowing parts of /proc or /sys with bind mounts)
are useless. Those measures are still useful. As such, the shadowing
of /proc/kcore is still enabled with both LXC and native drivers.

Special care has to be taken with /proc/1/attr, which still needs to
be mounted read-write in order to enable the AppArmor profile. It is
bind-mounted from a private read-write mount of procfs.

All that enforcement is done in dockerinit. The code doing the real
work is in libcontainer. The init function for the LXC driver calls
the function from libcontainer to avoid code duplication.

Docker-DCO-1.1-Signed-off-by: Jérôme Petazzoni <jerome@docker.com> (github: jpetazzo)
2014-05-01 15:26:58 -07:00
apparmor skip apparmor with dind 2014-05-01 22:22:08 +00:00
beam beam: Add simple framing system for UnixConn 2014-05-01 11:06:01 -07:00
cgroups Add ability to set cgroups freezer 2014-04-30 16:07:12 -07:00
collections Remove std sort and use custom sort for performances 2014-01-26 14:01:38 -08:00
dockerscript Fix various MAINTAINERS format inconsistencies 2014-04-30 11:22:11 -06:00
graphdb SQLite is also available in FreeBSD 2014-04-17 07:19:30 +09:00
iptables Revert "Support hairpin NAT without going through docker server" 2014-04-09 11:55:08 +00:00
label Update process labels to be set at create not start 2014-04-29 03:40:05 -07:00
libcontainer Mount /proc and /sys read-only, except in privileged containers. 2014-05-01 15:26:58 -07:00
listenbuffer adding configuration for timeout and disable it by default 2014-03-17 15:12:02 -07:00
mflag update godoc and add MAINTAINERS for mflags 2014-03-14 17:35:41 +00:00
mount Merge pull request #3841 from alexlarsson/separate-base-fs 2014-01-31 11:49:14 -08:00
namesgenerator Fix typo in names-generator 2014-04-04 00:57:43 +02:00
netlink Fix libcontainer network support on rhel6 2014-04-09 15:44:18 +02:00
proxy Remove verbose logging for non errors 2014-02-17 13:31:13 -08:00
selinux Fix SELinux errors caused by multi-threading 2014-04-29 03:40:05 -07:00
signal Fix various MAINTAINERS format inconsistencies 2014-04-30 11:22:11 -06:00
sysinfo remove ip_forward warning 2014-01-28 13:27:56 -06:00
system Integrate new structure into docker's native driver 2014-04-30 18:20:01 -07:00
systemd Add systemd.SdBooted() 2014-03-27 22:44:31 +01:00
term Use BSD raw mode on darwin. Fixes nano, tmux and others 2014-03-13 11:11:02 -07:00
user Use type switch instead of reflection 2014-01-31 20:15:24 -07:00
version Update Version to not use string anymore 2014-04-01 15:46:52 -07:00
README.md Add README to pkg 2013-12-23 23:12:19 +00:00

pkg/ is a collection of utility packages used by the Docker project without being specific to its internals.

Utility packages are kept separate from the docker core codebase to keep it as small and concise as possible. If some utilities grow larger and their APIs stabilize, they may be moved to their own repository under the Docker organization, to facilitate re-use by other projects. However that is not the priority.

The directory pkg is named after the same directory in the camlistore project. Since Brad is a core Go maintainer, we thought it made sense to copy his methods for organizing Go code :) Thanks Brad!

Because utility packages are small and neatly separated from the rest of the codebase, they are a good place to start for aspiring maintainers and contributors. Get in touch if you want to help maintain them!