3 Building your own Docker images

You ran some containers in the last chapter and used Docker to manage them. Containers provide a consistent experience across applications, no matter what technology stack the app uses. Up till now you’ve used Docker images that I’ve built and shared; in this chapter you’ll see how to build your own images. This is where you’ll learn about the Dockerfile syntax, and some of the key patterns you will always use when you containerize your own apps.

3.1 Using a container image from Docker Hub

We’ll start with the finished version of the image you’ll build in this chapter, so you can see how it’s been designed to work well with Docker. The try-it-now exercises all use a simple application called web-ping, which ...

Get Learn Docker in a Month of Lunches now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.