cd ..
DOCKER

Explaining Docker as a Franchise

Imagine opening a restaurant franchise where a strict standard must be followed. In Docker, it’s exactly the same.

Dockerfile: The Franchise Manual

When we think of a manual, we remember someone created a step-by-step guide that must be followed strictly. The Dockerfile defines this entire roadmap: it determines how the image should be created, built, and run.

Join The Writer’s Circle event Example guidelines:

Dockerfile

FROM ubuntu:20.04
RUN apt update && apt install -y nginx
CMD ["nginx", "-g", "daemon off;"]
O Docker lê esse manual, executa o passo a passo e gera uma Imagem.  

Image: The Standard Template

The image is the ready-made franchise template; it’s the standard that all “units” will follow. Like any franchise standard, the image is immutable. It serves as the base for creating containers, ensuring that all of them start exactly alike.

Containers: The Franchise Units

A container is the restaurant operating in practice. Each container is an instance of the image. You can have multiple containers running simultaneously:

All follow the same standard, but operate independently.

Configurations: Local Adaptations

Although they follow the standard, each franchise can have particularities:

In Docker, these are the configurations:

In other words: we have the same base, but with adapted behaviors.

References

What did you think?