Reader small image

You're reading from  Apache Mesos Cookbook

Product typeBook
Published inAug 2017
PublisherPackt
ISBN-139781785884627
Edition1st Edition
Right arrow
Authors (2):
David Blomquist
David Blomquist
author image
David Blomquist

David Blomquist been working with computers since the 1980s. His first computer was an Apple Macintosh and the first networked computer he managed was a 10 terminal Xenix system. Since that time, David has held positions in virtually every area of IT, including operations, development, and architecture. David now specializes in designing Big Data, HPC, and Grid Computing systems with applications in Health Care and Science. Most recently, he has designed and deployed several large-scale clusters for the Federal Government.
Read more about David Blomquist

View More author details
Right arrow

Launching a Docker container


In this recipe, you will learn how to launch a Docker container using the Marathon API. Marathon, as with most Mesos frameworks, is able to run Docker containers. This is extremely useful in a private PaaS because developers are able to ship their machines into production with one simple click without worrying about server configuration or asking admins for help.

Getting ready

Before you start, ensure Marathon is up and running and Mesos has enabled Docker support. You can find more information in Chapter 5, Managing Containers.

How to do it...

The operation is similar to running a command. The main difference is that we need to pass the Docker image description and its configuration such as ports, variables, and optional Docker parameters. Remember to enable Docker support on Mesos agents before proceeding.

The application definition could look as follows:

{ 
  "id": "/web/server",
  "cpus": 1.0,
  "mem": 64,
  "disk": 0,
  "instances": 1,
  "container": {
    "type...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Apache Mesos Cookbook
Published in: Aug 2017Publisher: PacktISBN-13: 9781785884627

Authors (2)

author image
David Blomquist

David Blomquist been working with computers since the 1980s. His first computer was an Apple Macintosh and the first networked computer he managed was a 10 terminal Xenix system. Since that time, David has held positions in virtually every area of IT, including operations, development, and architecture. David now specializes in designing Big Data, HPC, and Grid Computing systems with applications in Health Care and Science. Most recently, he has designed and deployed several large-scale clusters for the Federal Government.
Read more about David Blomquist