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.
Downloading Docker images
How to do it...
- Let's define the task to pull a Docker image:
- name: Download docker...