Mesos 0.20.0 will ship with a new ContainerInfo type. Marathon should support it. The semantics for TaskInfo will be as follows:
1. The new ContainerInfo message has a type field so that it may be extended. The only supported type is DOCKER. When supplying type DOCKER, the docker field (of type DockerInfo) must also be set.
2. CommandInfo: launches a command in a container (current behavior).
3. CommandInfo with ContainerInfo: runs the supplied command as a task with the CommandExecutor inside the specified container.
4. ExecutorInfo: run with a custom executor – note that ExecutorInfo now has a ContainerInfo field to run the whole thing inside of the specified container.