Summary

A summary of the content covered in this chapter, Ansible Development with Containers.

A journey of a thousand miles begins with a single step.

It might sound a bit cliche, but YOU have been able to take the first step in the right direction. This chapter introduced a consistent, containerized environment, how to set it up, and how YOU can interact with it.

Let’s do a recap of the objectives that we set at the start of this chapter:

  1. Install Docker.
  2. Create a Dockerfile.
  3. Build a Docker Image.
  4. Run a Docker Container.
  5. Push a Docker Image to DockerHub.
Objectives

We would say that you have achieved these objectives. But you still have a long way to go. Due to time constraints and the nature of the subject matter at hand, we cannot dive too much deeper into Docker as it requires courses of its own. We have to cherry-pick the parts required for our use case and make do with them.

Docker setup

Let’s look at how the Docker setup looks right now. As we go along, we will keep adding packages and tools to the Docker setup.

# Base Image
FROM ubuntu:latest
RUN apt-get update; \
apt install -y openssh-client; \
apt install -y python3-pip
RUN pip3 install --upgrade pip; \
pip3 install "ansible==2.9.12"
Dockerfile

Now that we’ve laid the basic foundation, we will continue to build on it in the following lessons.

Get hands-on with 1300+ tech skills courses.