If you're new to Mesos

See the getting started page for more information about downloading, building, and deploying Mesos.

If you'd like to get involved or you're looking for support

See our community page for more details.

Docker Runtime Isolator in Mesos Containerizer

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, the agent will refuse to start.

To enable the Docker Runtime isolator, append docker/runtime to the --isolation flag when starting the agent.

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 whether the task is a command task or uses a custom executor, respectively).

Determine the Launch Command

If the 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.

Entrypoint=0
Cmd=0
Entrypoint=0
Cmd=1
Entrypoint=1
Cmd=0
Entrypoint=1
Cmd=1
sh=0
value=0
argv=0
Error /Cmd[0]
Cmd[1]..
/Entrypt[0]
Entrypt[1]..
/Entrypt[0]
Entrypt[1]..
Cmd..
sh=0
value=0
argv=1
Error /Cmd[0]
argv
/Entrypt[0]
Entrypt[1]..
argv
/Entrypt[0]
Entrypt[1]..
argv
sh=0
value=1
argv=0
/value /value /value /value
sh=0
value=1
argv=1
/value
argv
/value
argv
/value
argv
/value
argv
sh=1
value=0
argv=0
Error Error Error Error
sh=1
value=0
argv=1
Error Error Error Error
sh=1
value=1
argv=0
/bin/sh -c
value
/bin/sh -c
value
/bin/sh -c
value
/bin/sh -c
value
sh=1
value=1
argv=1
/bin/sh -c
value
/bin/sh -c
value
/bin/sh -c
value
/bin/sh -c
value