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.
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:
As the base nginx image has already got port 80 and 443 exposed, we will ...