Build Your Own PaaS with Docker
Format: PDF / Kindle (mobi) / ePub
Create, modify, and run your own PaaS with modularized containers using Docker
About This Book
Build your own PaaS using the much-appreciated software Docker.
Isolate services in containers to have a fully modularized and portable system.
Step-by-step tutorials that take you through the process of creating your own PaaS.
Who This Book Is For
This book is intended for those who want to take full advantage of separating services into module containers and connect them to form a complete platform. It will give you all the insights and knowledge needed to run your own PaaS.
Docker is a great tool in many ways for developers and people in DevOps.
We begin by learning how easy it is to create and publish your own customized Docker images and making them available to everyone. We also see how practical it is to separate every service to its own container. When you have published separated service containers, the process of running all kinds of platforms in the same server is a walk in the park.
This book walks you through a use case project that will teach you how to customize and create your own Docker image, allowing you to run any platform you want. The project evolves throughout the book and emerges as a complete three containers WordPress/MySQL platform when finished.
By the end of the book, you will know how to create such a container on a WordPress/MySQL platform, among others.
in this GitHub repository. If you have a lot of Docker images and the images have a lot of versions, you might want to consider a different structure, but for this book, this approach will be great! All files are in place, and you can click on them to verify that the contents are what we would expect. Publishing an image on the Docker Registry Hub If you're not a member of the Docker Registry Hub (https://hub.docker.com), now is the time to register so that you can publish your images on the
flags mean that we want to keep the session interactive and allocate a pseudo-TTY. data-one is the name of the container, but you can use the container ID if you like. I would choose /bin/bash over /bin/sh, but the container runs BusyBox and /bin/bash isn't available there. For the kinds of tasks that we are about to perform, it doesn't matter which shell we use. What we want to do is to take a look in the directories we exposed as VOLUMES in this data volume container. The directories are
PaaS containers. Chapter 5, Connecting Containers, shows you how to manually connect containers in order to form a complete platform, and introduces two tools that give you more control over multicontainer platforms. Chapter 6, Reverse Proxy Requests, explains the problem and provides a solution to having multiple containers on the same host, where more than one host should be reachable on the same port. Chapter 7, Deployment on Our PaaS, takes you through the process of deploying code to your
repository. Create a composer.json file to tell Dokku that this is a PHP app we are creating. You can read more about how to hint Dokku on what type of app you are creating at https://devcenter.heroku.com/ articles/buildpacks (yes, Dokku uses Heroku buildpacks) and looks to detect functions. Dokku uses a library called Buildstep to make application builds using Docker and Buildpacks. [ 104 ] Chapter 7 Let's go ahead and get started now. I used a server on my domain, ohdokku.com, for this app:
Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books. Why subscribe? • Fully searchable across every book published by Packt • Copy and paste, print, and bookmark content • On demand and accessible via a web browser Free access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.