1MinDocker #12 - What is CI/CD?

Hello world and Happy 2025!šŸ³āœØ

Itā€™s time we resume our 1minDocker series, starting our last learning block, consisting of 4 articles, that will introduce us to CI/CD practices with Docker.

In order to get started with this last learning block, tho, we need to understand what CI/CD is: letā€™s dive in!

What does CI/CD mean?

CI/CD is short for Continuous Integration/Continuous Delivery or, sometimes, Continuous Deployment. Letā€™s break it down:

What are the main steps of CI/CD?

As this image shows:

CI/CD

Image from Black duck: What is CI/CD

The CI/CD pipeline contains several really important steps, that are inserted in a ā€œinfiniteā€ loop (thatā€™s the main idea behind the continuous thing):

Why CI/CD and Docker?

As you can see, CI/CD requires several environments: a build environment, a test environment and a deployment environment. Docker is a perfect solution, as we can manage everything through different containers, just using simple commands like docker build and docker run. Docker is also perfect for deployment, as it does not require complex environment set-up from scratch: you can build a portable image with all the dependencies and simply deploy it building from Dockerfile and running it.

Docker handles secrets, takes care of data transfer from the local context to the container and manages networks.

With Docker, you can even manage all of this with one command: you simply need to create a compose.yaml file and define your services, their sources (if pre-existing images or on-the-fly builds) and their specs (secrets, volumes, networks). After that, you simply need docker compose up. Itā€™s really simple, isnā€™t it?šŸ³

Sources