<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
docker run --privileged<br>
<br>
Turns off all of the docker security.<br>
<br>
Has anyone tried to run a container for something like mesos that
execs docker commands, to maybe look like<br>
<br>
docker run --privileged -v /:/host -v /run:/run -ti -net=host mesos
/bin/sh<br>
<br>
This would cause all of / to be mounted in /host and then you could
execute<br>
<br>
/host/usr/bin/docker for example. Not sure why you would want
/var/lib/docker mounted into the mesos container.<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 09/23/2014 09:18 AM, Tim St Clair
wrote:<br>
</div>
<blockquote
cite="mid:1175035394.35104289.1411478293053.JavaMail.zimbra@redhat.com"
type="cite">
<div style="font-family: times new roman, new york, times, serif;
font-size: 12pt; color: #000000">
<div>Scott - </div>
<div><br>
</div>
<div>When you mentioned running in "privileged mode" mode, what
does that mean? Could you provide more details.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Tim</div>
<div><br>
</div>
<hr id="zwchr">
<blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"
data-mce-style="border-left: 2px solid #1010FF; margin-left:
5px; padding-left: 5px; color: #000; font-weight: normal;
font-style: normal; text-decoration: none; font-family:
Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Tim
Chen" <a class="moz-txt-link-rfc2396E" href="mailto:tim@mesosphere.io"><tim@mesosphere.io></a><br>
<b>To: </b><a class="moz-txt-link-abbreviated" href="mailto:user@mesos.apache.org">user@mesos.apache.org</a>, "Gabriel Monroy"
<a class="moz-txt-link-rfc2396E" href="mailto:gabriel@opdemand.com"><gabriel@opdemand.com></a><br>
<b>Sent: </b>Tuesday, September 23, 2014 2:41:17 AM<br>
<b>Subject: </b>Re: Running mesos-slave in Docker container<br>
<div><br>
</div>
<div dir="ltr">Hi Grzegorz,
<div><br>
</div>
<div>To run Mesos master|slave in a docker container is not
straight forward because we utilize kernel features
therefore you need to explicitly test out the features you
like to use with Mesos with slave/master in Docker.</div>
<div><br>
</div>
<div>Gabriel during the Mesosphere hackathon has got master
and slave running in docker containers, and he can
probably share his Dockerfile and run command.</div>
<div><br>
</div>
<div>I believe one work around to get cgroups working with
Docker run is to mount /sys into the container (mount -v
/sys:/sys).</div>
<div><br>
</div>
<div>Gabriel do you still have the command you used to run
slave/master with Docker?</div>
<div><br>
</div>
<div>Tim</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Sep 23, 2014 at 12:24 AM,
Grzegorz Graczyk <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:gregory90@gmail.com" target="_blank"
data-mce-href="mailto:gregory90@gmail.com">gregory90@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"
data-mce-style="margin: 0 0 0 .8ex; border-left: 1px
#ccc solid; padding-left: 1ex;">
<div dir="ltr"><span
style="font-family:arial,sans-serif;font-size:13px"
data-mce-style="font-family: arial,sans-serif;
font-size: 13px;">I'm trying to run mesos-slave
inside Docker container, but it can't start due to
problem with mounting cgroups.</span><br
style="font-family:arial,sans-serif;font-size:13px"
data-mce-style="font-family: arial,sans-serif;
font-size: 13px;">
<br
style="font-family:arial,sans-serif;font-size:13px"
data-mce-style="font-family: arial,sans-serif;
font-size: 13px;">
<span
style="font-family:arial,sans-serif;font-size:13px"
data-mce-style="font-family: arial,sans-serif;
font-size: 13px;">I'm using:</span><br
style="font-family:arial,sans-serif;font-size:13px"
data-mce-style="font-family: arial,sans-serif;
font-size: 13px;">
<div
style="font-family:arial,sans-serif;font-size:13px"
data-mce-style="font-family: arial,sans-serif;
font-size: 13px;">Kernel Version: 3.13.0-32-generic</div>
<div
style="font-family:arial,sans-serif;font-size:13px"
data-mce-style="font-family: arial,sans-serif;
font-size: 13px;">Operating System: Ubuntu 14.04.1
LTS</div>
<div
style="font-family:arial,sans-serif;font-size:13px"
data-mce-style="font-family: arial,sans-serif;
font-size: 13px;">Docker: 1.2.0(commit fa7b24f)<br>
Mesos: 0.20.0<br>
<div><br>
</div>
Following error appears:</div>
<div
style="font-family:arial,sans-serif;font-size:13px"
data-mce-style="font-family: arial,sans-serif;
font-size: 13px;">
<div>I0923 07:11:20.921475 19 main.cpp:126]
Build: 2014-08-22 05:04:26 by root</div>
<div>I0923 07:11:20.921608 19 main.cpp:128]
Version: 0.20.0</div>
<div>I0923 07:11:20.921620 19 main.cpp:131] Git
tag: 0.20.0</div>
<div>I0923 07:11:20.921628 19 main.cpp:135] Git
SHA: f421ffdf8d32a8834b3a6ee483b5b59f65956497</div>
<div>Failed to create a containerizer: Could not
create DockerContainerizer: Failed to find a
mounted cgroups hierarchy for the 'cpu' subsystem;
you probably need to mount cgroups manually!<br>
<div><br>
</div>
I'm running docker container with command:<br>
docker run --name mesos-slave --privileged
--net=host -v
/var/run/docker.sock:/var/run/docker.sock -v
/var/lib/docker:/var/lib/docker -v
/usr/local/bin/docker:/usr/local/bin/docker
gregory90/mesos-slave
--containerizers=docker,mesos
--master=zk://localhost:2181/mesos --ip=127.0.0.1<br>
<div><br>
</div>
Everything is running on single machine.</div>
</div>
<div
style="font-family:arial,sans-serif;font-size:13px"
data-mce-style="font-family: arial,sans-serif;
font-size: 13px;">Everything works as expected when
mesos-slave is run outside docker container.<br>
<div><br>
</div>
I'd appreciate some help.</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<div><br>
<br>
</div>
<div><br>
</div>
<div>-- <br>
</div>
<div><span name="x"></span>Cheers,<br>
Timothy St. Clair<br>
Red Hat Inc.<span name="x"></span><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
cloud mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cloud@lists.fedoraproject.org">cloud@lists.fedoraproject.org</a>
<a class="moz-txt-link-freetext" href="https://admin.fedoraproject.org/mailman/listinfo/cloud">https://admin.fedoraproject.org/mailman/listinfo/cloud</a>
Fedora Code of Conduct: <a class="moz-txt-link-freetext" href="http://fedoraproject.org/code-of-conduct">http://fedoraproject.org/code-of-conduct</a>
</pre>
</blockquote>
<br>
</body>
</html>