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.
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.
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 (
FROM library/alpine:3.1 CMD /bin/sh -c "while true; do echo Hello, world; sleep 1; ...