O'Reilly logo

Puppet for Containerization by Scott Coulton

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

Working with official images

Now that we know how Docker Hub serves images to us, let's look at how to integrate them into our code via three methods. The first will be a Dockerfile, the second will be in the docker-compose.yaml file, and the last will be straight into a Puppet manifest.

Dockerfiles

In this topic, we will look at using nginx in a basic Dockerfile. In a Dockerfile, we need to add a few things. The first is the image that we are basing our application on; for us it will be nginx. The second is a maintainer. It should look like as shown in the following screenshot:

Dockerfiles

As the base nginx image has already got port 80 and 443 exposed, we will ...

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