Downloading Docker images 

In this recipe, we will download a Docker image. In a production environment, while creating a Docker image for an application, we need to add code and the configurations of our application over the top of an existing Docker image (sometimes referred to as a base image), such as Ubuntu, CentOS, and so on. When we deploy a container to a critical environment, we want to minimize the risk of delays. Therefore, it is better to download the image locally before using the docker_container module, so as to reduce the deployment time. In this recipe, we will also learn how to create a Docker image using Dockerfile.

Get Ansible 2 Cloud Automation Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.