O'Reilly logo

The Packer Book by James Turnbull

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5 Docker and Packer

In the last chapter we saw how to use provisioners to customize our images during the build process. In this chapter, we’re going to continue to explore building and provisioning images with Packer. And we’re going to look at one of Packer’s most interesting and complex use cases: building Docker images.

To build Docker images, Packer uses the Docker daemon to run containers, runs provisioners on those containers, then can commit Docker images locally or push them up to the Docker Hub. But, interestingly, Packer doesn’t use Dockerfiles to build images. Instead Packer uses the same provisioners we saw in Chapter 3 to build images. This allows us to create a consistent mental model for all our images, across all platforms. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required