You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2016/03/02 03:27:48 UTC

mesos git commit: Documented the docker runtime isolator.

Repository: mesos
Updated Branches:
  refs/heads/master 2c8c2c74a -> 4093229e9


Documented the docker runtime isolator.

Review: https://reviews.apache.org/r/44189/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/4093229e
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/4093229e
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/4093229e

Branch: refs/heads/master
Commit: 4093229e9d5fa3b3d772a6f82f7b5b603fd51317
Parents: 2c8c2c7
Author: Gilbert Song <so...@gmail.com>
Authored: Tue Mar 1 18:25:29 2016 -0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Tue Mar 1 18:27:42 2016 -0800

----------------------------------------------------------------------
 docs/mesos-containerizer.md | 102 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 102 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4093229e/docs/mesos-containerizer.md
----------------------------------------------------------------------
diff --git a/docs/mesos-containerizer.md b/docs/mesos-containerizer.md
index 5edfbc3..15fb5bd 100644
--- a/docs/mesos-containerizer.md
+++ b/docs/mesos-containerizer.md
@@ -84,6 +84,108 @@ The interval between two `du`s can be controlled by the slave flag
 `--container_disk_watch_interval=1mins` sets the interval to be 1
 minute. The default interval is 15 seconds.
 
+
+### Docker Runtime Isolator
+
+The Docker Runtime isolator is used for supporting runtime
+configurations from the docker image (e.g., Entrypoint/Cmd, Env,
+etc.). This isolator is tied with `--image_providers=docker`. If
+`--image_providers` contains `docker`, this isolator must be used.
+Otherwise, slave will refuse to start.
+
+To enable the Docker Runtime isolator, append `docker/runtime` to the
+`--isolation` flag when starting the slave.
+
+Currently, docker image default `Entrypoint`, `Cmd`, `Env` and
+`WorkingDir` are supported with docker runtime isolator. Users can
+specify `CommandInfo` to override the default `Entrypoint` and `Cmd`
+in the image (see below for details). The `CommandInfo` should be
+inside of either `TaskInfo` or `ExecutorInfo` (depending on running
+command task or custom executor respectively).
+
+#### Determine the Launch Command
+
+If user specifies a command in `CommandInfo`, that will override the
+default Entrypoint/Cmd in the docker image. Otherwise, we will use the
+default Entrypoint/Cmd and append arguments specified in `CommandInfo`
+accordingly. The details are explained in the following table.
+
+Users can specify `CommandInfo` including `shell`, `value` and
+`arguments`, which are represented in the first column of the table
+below. `0` represents `not specified`, while `1` represents
+`specified`. The first row is how `Entrypoint` and `Cmd` defined in
+the docker image. All cells in the table, except the first column and
+row, as well as cells labeled as `Error`, have the first element
+(i.e., `/Entrypt[0]`) as executable, and the rest as appending
+arguments.
+
+<table class="table table-striped">
+  <tr>
+    <th></th>
+    <th>Entrypoint=0<br>Cmd=0</th>
+    <th>Entrypoint=0<br>Cmd=1</th>
+    <th>Entrypoint=1<br>Cmd=0</th>
+    <th>Entrypoint=1<br>Cmd=1</th>
+  </tr>
+  <tr>
+    <td>sh=0<br>value=0<br>argv=0</td>
+    <td>Error</td>
+    <td>/Cmd[0]<br>Cmd[1]..</td>
+    <td>/Entrypt[0]<br>Entrypy[1]..</td>
+    <td>/Entrypy[0]<br>Entrypy[1]..<br>Cmd..</td>
+  </tr>
+  <tr>
+    <td>sh=0<br>value=0<br>argv=1</td>
+    <td>Error</td>
+    <td>/Cmd[0]<br>argv</td>
+    <td>/Entrypt[0]<br>Entrypy[1]..<br>argv</td>
+    <td>/Entrypy[0]<br>Entrypy[1]..<br>argv</td>
+  </tr>
+  <tr>
+    <td>sh=0<br>value=1<br>argv=0</td>
+    <td>/value</td>
+    <td>/value</td>
+    <td>/value</td>
+    <td>/value</td>
+  </tr>
+  <tr>
+    <td>sh=0<br>value=1<br>argv=1</td>
+    <td>/value<br>argv</td>
+    <td>/value<br>argv</td>
+    <td>/value<br>argv</td>
+    <td>/value<br>argv</td>
+  </tr>
+  <tr>
+    <td>sh=1<br>value=0<br>argv=0</td>
+    <td>Error</td>
+    <td>Error</td>
+    <td>Error</td>
+    <td>Error</td>
+  </tr>
+  <tr>
+    <td>sh=1<br>value=0<br>argv=1</td>
+    <td>Error</td>
+    <td>Error</td>
+    <td>Error</td>
+    <td>Error</td>
+  </tr>
+  <tr>
+    <td>sh=1<br>value=1<br>argv=0</td>
+    <td>/bin/sh -c<br>value</td>
+    <td>/bin/sh -c<br>value</td>
+    <td>/bin/sh -c<br>value</td>
+    <td>/bin/sh -c<br>value</td>
+  </tr>
+  <tr>
+    <td>sh=1<br>value=1<br>argv=1</td>
+    <td>/bin/sh -c<br>value</td>
+    <td>/bin/sh -c<br>value</td>
+    <td>/bin/sh -c<br>value</td>
+    <td>/bin/sh -c<br>value</td>
+  </tr>
+</table>
+
+
 ### The `cgroups/net_cls` Isolator
 
 The cgroups/net_cls isolator allows operators to provide network