O'Reilly logo

Puppet 4.10 Beginner's Guide - Second Edition by John Arundel

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

Managing Docker images

Of course, it's very useful to be able to download and run public images from Docker Hub or other registries, but to unlock the real power of Docker we need to be able to build and manage our own images too.

Building images from Dockerfiles

As we saw in the previous examples, if you don't already have the specified container image on your system, Puppet's docker::image resource will pull it from Docker Hub for you and save it locally.

The docker::image resource is most useful, however, for actually building Docker images. This is usually done using a Dockerfile, so here is an example Dockerfile we can use to build an image (Dockerfile.hello):

FROM library/alpine:3.1 CMD /bin/sh -c "while true; do echo Hello, world; sleep 1; ...

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