Search code examples
dockermesosmesosphere

Apache Mesos's Docker Containerizer


I setup both of my mesos-master and mesos-slave on a standalone server. E.g. To start my mesos-slave, I used this command:

sudo bin/mesos-slave.sh --master=zk://<IP address of server>:2181/mesos --log_dir=/var/log/mesos --containerizers=docker,mesos

What I am trying to figure out is how the containerizer on Mesos is implemented with just --containerizers=docker,mesos.

Will it be able to automatically detect whether Docker is installed on the mesos-slave? If it is, which tcp port will it normally get? port 4243 or 2375?


Solution

  • Mesos will try to autodetect docker by running docker version. You can specific an absolute path for the docker executable by passing the --docker=/path/to/docker flag to the slave. There are other docker-specific flags for the slave, like --docker_sandbox_directory, --docker_remove_delay, and --docker_stop_timeout. For more details on those, see https://mesos.apache.org/documentation/latest/configuration/

    Mesos currently uses the docker command-line interface locally from the slave node, not via the remote API, so I don't think the docker port is relevant here.