Deploying containerized apps using Docker and Mesos
This section gives a brief overview of deploying a Docker containerized Node.js application on Mesos using Marathon. This requires you to have Docker and fig already installed on the machine. Let's follow the steps listed next to carry out the deployment:
Since we are deploying a simple Node.js application, we can start off by creating a simple
App.js
to printHello World
, a simple hello world Node.js program.var http = require('http'); // Configure our HTTP server to respond with Hello World to all requests. var server = http.createServer(function (request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.end("Hello World "); }); // Listen on port 8000, IP defaults to "0.0.0.0" server.listen(8000); // Put a friendly message on the terminal console.log("Server running at
http://127.0.0.1:8000/
");Next we create the
package.json
file with the following contents:{ "name": "hello-world", "description"...