A Docker

 

In this appendix:

  • What Docker is and how you install it
  • How to run and stop Docker containers

Most of the examples in this book use Docker to quickly get a fairly complex system up and running on your computer. It’s an easy way for me to provide a consistent interface to the examples without having to worry about different operating systems.

In this appendix you’ll find a really short crash course in Docker but I do encourage you to take a closer look at container technology like Docker. It’s very neat.

A.1  What is Docker?

Back in the day, when the Java programming language took the world by storm, the slogan used for Java was: Write once, run anywhere. It was wonderful. You didn’t have to think about different operating systems. The Java virtual machine took care of it all. Soon people started to notice weird behaviors depending on the operating system because you can’t really abstract away the operating system. A more humorous slogan made rounds: Write once, debug everywhere.

The dream of writing the code once and running it on any machine is still alive. It’s an important step in the commoditization of software. To make even complex server software easy to deploy securely. That’s where Docker steps in.

A.1.1  Docker images and containers

A.1.2  Installing Docker

A.2  Running Docker images

A.2.1  Docker networks

A.2.2  Stopping and removing containers