Using the Docker containerizer
In this recipe, you will learn how to enable and run Docker images with a Docker containerizer. What this means is instead of using the Mesos implementation of standard Docker, we will use the Docker daemon to run images.
These days, Docker is the standard for containerization. Mesos supports two ways of launching Docker images. The first implemented was Docker containerizer, which is just a wrapper for the Docker daemon. Mesos does not launch containers itself. Instead, it asks the Docker daemon to do it. When a container is launched, Mesos monitors its state and bypasses framework commands (for example, kill
) to the Docker daemon.
There is a second way of running Docker images, introduced in Mesos 1.0. It uses the Mesos containerizer to launch Docker images. Using this approach, no Docker installation is required and Mesos performs all the operations itself.
Getting ready
Install Docker on all agents:
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers...