Commit graph

18 commits

Author SHA1 Message Date
Michael Crosby
ba9f9b3c92 Merge pull request #4818 from viirya/fix_working_dir_not_dir
fix the problem when setting existing file as working dir
2014-03-27 11:41:18 -07:00
Dan Walsh
4c43566925 This patch adds SELinux labeling support.
docker will run the process(es) within the container with an SELinux label and will label
all of  the content within the container with mount label.  Any temporary file systems
created within the container need to be mounted with the same mount label.

The user can override the process label by specifying

-Z With a string of space separated options.

-Z "user=unconfined_u role=unconfined_r type=unconfined_t level=s0"

Would cause the process label to run with unconfined_u:unconfined_r:unconfined_t:s0"

By default the processes will run execute within the container as svirt_lxc_net_t.
All of the content in the container as svirt_sandbox_file_t.

The process mcs level is based of the PID of the docker process that is creating the container.

If you run the container in --priv mode, the labeling will be disabled.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2014-03-26 15:30:40 -04:00
viirya
293157b8b3 check if working dir is a directory and raise corresponding errors when making dir.
Docker-DCO-1.1-Signed-off-by: Liang-Chi Hsieh <viirya@gmail.com> (github: viirya)
2014-03-25 17:47:08 +08:00
Michael Crosby
d503714285 Revert "Disable automatic killing of containers when docker stop fails"
This reverts commit 8b5cf51d60.

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-24 12:03:56 +00:00
Victor Vieux
3b1d590269 cleanup container.stop
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-18 23:48:14 +00:00
Guillaume J. Charmes
bfbf338f51 Merge pull request #4684 from cpuguy83/4682-do_not_sigkill_on_docker_stop
Disable automatic killing of containers when docker stop fails
2014-03-18 11:28:42 -07:00
Timothy Hobbs
659b719aa6 Refactor out interface specific information from execdriver.Network
Docker-DCO-1.1-Signed-off-by: Timothy Hobbs <timothyhobbs@seznam.cz> (github: https://github.com/timthelion)
2014-03-17 22:53:48 +01:00
Guillaume J. Charmes
dd040c9870 Merge pull request #4723 from vieux/fix_panic_monitor
fix panic in monitor
2014-03-17 13:52:22 -07:00
unclejack
0e92c7c24a Merge pull request #4721 from vieux/4716-display_ps-fix
Fix display command display in docker ps
2014-03-17 22:04:00 +02:00
Victor Vieux
1dfc440733 fix panic in monitor
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-17 19:33:40 +00:00
Brian Goff
8b5cf51d60 Disable automatic killing of containers when docker stop fails
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
2014-03-17 15:15:44 -04:00
Michael Crosby
2bddcd68b4 Gofmt imports
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-17 11:41:28 -07:00
Michael Crosby
96c4816cef Move graphdrivers into runtime top level pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-17 11:40:12 -07:00
Michael Crosby
af385151ce Move execdrivers into runtime top level pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-17 11:40:12 -07:00
Victor Vieux
5921b186d1 display command display in docker ps
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-03-17 18:36:15 +00:00
Alexander Larsson
bf1b27dfcc Don't use separate bind mount for container
Since we're not not mounting anything but the base filesystem outside
the container we no longer need the separate bind mount at
/var/lib/docker/container/$id/root in order to see the base filesystem
without extra mounts. So, we drop this and mount (again) the container
root directly at the real basefs mountpoint.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-13 20:08:29 +01:00
Alexander Larsson
6c266c4b42 Move all bind-mounts in the container inside the namespace
This moves the bind mounts like /.dockerinit, /etc/hostname, volumes,
etc into the container namespace, by setting them up using lxc.

This is useful to avoid littering the global namespace with a lot of
mounts that are internal to each container and are not generally
needed on the outside. In particular, it seems that having a lot of
mounts is problematic wrt scaling to a lot of containers on systems
where the root filesystem is mounted --rshared.

Note that the "private" option is only supported by the native driver, as
lxc doesn't support setting this. This is not a huge problem, but it does
mean that some mounts are unnecessarily shared inside the container if you're
using the lxc driver.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-03-13 20:01:29 +01:00
Michael Crosby
36c3614fdd Move runtime and container into sub pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-03-09 23:03:40 -07:00
Renamed from container.go (Browse further)