Hi Thomas,
You might be looking for a custom ("external") containerizer. The
containerizer is what creates the container that the executor is run in, so
you should not have an executor launching another containerizer. If you
want to modify/control the docker run commands (besides specifying
arbitrary additional parameters in DockerInfo.parameters) right now, you'll
need your own custom containerizer (perhaps a modified copy of the docker
containerizer). See
https://mesos.apache.org/documentation/latest/external-containerizer/
We'll probably turn this into a Mesos module soon, for easier integration
with our now-standard plugin policy.
There's also been talk of adding some hooks for performing actions
before/after docker pull/run, but I don't think there's a JIRA for it yet.
On Wed, Apr 8, 2015 at 3:23 AM, Alex Rukletsov <[email protected]> wrote:
> Stephen,
>
> FWIK, every containerizer supports two launch strategies: with custom
> executor and with the default mesos-executor. Docker containerizer is no
> exception. To use your own executor, specify ExecutorInfo instead of
> CommandInfo in your TaskInfo. Also make sure you provide ContainerInfo in
> ExecutorInfo now. In this case the container is expected to act as
> mesos-executor. We also plan to create a special executor for dockers, see
> https://issues.apache.org/jira/browse/MESOS-2595.
>
> Tim, do you want to add / correct something?
>
> On Tue, Apr 7, 2015 at 10:10 PM, Stephen Salinas <[email protected]>
> wrote:
>
> > Hey Everyone,
> >
> > I have a question on using the docker containerizer. I have a feeling
> it
> > isn’t possible, but, is there a way to use the docker containerizer
> within
> > a custom executor? (ie. have it help translate commands to docker and
> > manage the containers within the wrapper of the custom executor).
> >
> > We know that we can launch a docker container as a task via the default
> > mesos executor, and we know that we can launch a docker container with a
> > custom executor, but we'd like our custom executor to be lauched
> *outside*
> > of the docker container we specify in the TaskInfo -- is this possible
> via
> > the docker containerizer?
> >
> > -Stephen
> >
>