Book Image

Build Your Own PaaS with Docker

By : Oskar Hane
Book Image

Build Your Own PaaS with Docker

By: Oskar Hane

Overview of this book

<p>Docker is a great tool in many ways for developers and people in DevOps.</p> <p>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 for easier cloud computing is a walk in the park.</p> <p>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.</p> <p>By the end of the book, you will know how to create such a container on a Wordpress/MySQL platform, among others.</p>
Table of Contents (15 chapters)
Build Your Own PaaS with Docker
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The Docker command-line interface


The command line interface is where we communicate with the daemon using the Docker command. The Docker daemon is the background process that receives the commands that are typed by us.

In the previous chapter, we ran a few Docker commands to start and stop containers as well as to list containers and images. Now, we are going to learn a few more that will help us when handling containers for our PaaS, as follows:

  • docker logs <container-ID|name>: Everything that is written to the STDOUT containers will end up in the file that can be accessed via this command. This is a very handy way to output information from within a container, as shown here:

  • docker export <container-ID|name>: If you have a container that holds data that you want to export, this is the command to be used. This creates a tar archive and sends it to STDOUT:

  • docker cp CONTAINER:PATH HOSTPATH: If you don't want the whole file system from a container but just one directory or a file...