Skip to content
O'Reilly home
Learning Path

Learning Path: Creating Docker Images and Dockerfiles


Containers have revolutionized the way we engineer and deploy software. No longer do developers need to concern themselves with coding around compatibility issues in the deployment environment because containers carry the complete runtime and binaries within them, rendering them infrastructure agnostic. With container technology, gone are the days when developers would regularly hear the lament, “Well, it worked on my computer…” when trying to determine the cause of a problem in your production application. And from the beginning, Docker has been the leader in this paradigm shifting technology, and Dockerfiles and images have been the foundation upon which the framework stands. Having a solid understanding of how they work is key to building lean, efficient, and reliable applications, particularly for cloud environments.

In this learning path, geared toward developers with prior experience using Docker and a basic understanding of the Dockerfile specification, you’ll gain an understanding of the role of Dockerfiles in the Docker ecosystem. You’ll also look at how the Unionfs filesystem works and how you can use it to build smaller images and reduce the time it takes to build and push images for consumption. You’ll further examine the Dockerfile specification and its vast array of capabilities, including the aspects of it that might trip you up. When you’ve completed this learning path, you will be able to confidently write Dockerfiles and configure containers. And as an added bonus, this learning path provides plenty of suggestions on how to continue your journey in the brand new world of containerization.

What you’ll learn—and how you can apply it

  • What the role of the Dockerfile is in the Docker build system
  • How the Unionfs works and its effect on building images
  • How to create lean, deterministic Docker images
  • How to design your Dockerfile to achieve right level of configurability to the resulting container
  • How best to use the various instructions in the Dockerfile specification and avoid associated gotchas
  • How to use multistage Dockerfiles that allow you to build, test, and package your code all while producing minimal production grade images

This learning path is for you because…

  • You're a developer working on writing a Dockerfile for your application and you need to ensure that you are using the docker cache correctly (for faster builds)
  • You want to feel confident that you are building the leanest possible image (and consequent container)
  • You're a build engineer trying to optimize your build pipeline that uses containers for testing, building, and producing production grade images with absolute minimum fuss
  • You're a developer working with a multitier architecture, be that layered, service-based, or microservices, and you need a mechanism to easily spin up your services, databases, and queues that can communicate with one another


  • Knowledge of Docker.

Materials or downloads needed in advance: TBD

Further resources:

About the Publisher

O’Reilly’s mission is to change the world by sharing the knowledge of innovators. For over 40 years, we’ve inspired companies and individuals to do new things—and do things better—by providing them with the skills and understanding that’s necessary for success.

At the heart of our business is a unique network of experts and innovators who share their knowledge through us. O’Reilly online learning offers exclusive live training, interactive learning, a certification experience, books, videos, and more, making it easier for our customers to develop the expertise they need to get ahead. And our books have been heralded for decades as the definitive place to learn about the technologies that are shaping the future. Everything we do is to help professionals from a variety of fields learn best practices and discover emerging trends that will shape the future of the tech industry.

More about O'Reilly Media, Inc.