Repository: mesos Updated Branches: refs/heads/master 2fbb2fb4d -> 3633142e4
Add priviledged option to docker info Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/4cec1140 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/4cec1140 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/4cec1140 Branch: refs/heads/master Commit: 4cec1140351de976ec443e9b36a55be3c20bd10f Parents: 2fbb2fb Author: Timothy Chen <[email protected]> Authored: Fri Oct 10 09:20:30 2014 -0700 Committer: Timothy Chen <[email protected]> Committed: Fri Oct 31 17:04:17 2014 -0700 ---------------------------------------------------------------------- include/mesos/mesos.proto | 2 ++ src/docker/docker.cpp | 4 ++++ 2 files changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/4cec1140/include/mesos/mesos.proto ---------------------------------------------------------------------- diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto index 168a7a8..1d4f673 100644 --- a/include/mesos/mesos.proto +++ b/include/mesos/mesos.proto @@ -881,6 +881,8 @@ message ContainerInfo { } repeated PortMapping port_mappings = 3; + + optional bool privileged = 4 [default = false]; } required Type type = 1; http://git-wip-us.apache.org/repos/asf/mesos/blob/4cec1140/src/docker/docker.cpp ---------------------------------------------------------------------- diff --git a/src/docker/docker.cpp b/src/docker/docker.cpp index d423d44..81d538a 100644 --- a/src/docker/docker.cpp +++ b/src/docker/docker.cpp @@ -293,6 +293,10 @@ Future<Nothing> Docker::run( argv.push_back("run"); argv.push_back("-d"); + if (dockerInfo.privileged()) { + argv.push_back("--privileged"); + } + if (resources.isSome()) { // TODO(yifan): Support other resources (e.g. disk). Option<double> cpus = resources.get().cpus();
