Contêineres (Docker) e CI/CD funcionam juntos de forma poderosa — contêineres oferecem ambientes consistentes de compilação/teste e artefatos de implantação imutáveis (imagens), enquanto pipelines de CI/CD compilam, testam e implantam essas imagens. Contêineres resolvem problemas-chave de consistência no processo de entrega.
Contêineres como ambientes consistentes de compilação/teste
→ Run pipeline jobs INSIDE containers → the build/test environment is CONSISTENT and
reproducible (same tools/versions every time, locally and in CI)
→ No "works on my machine" / "works in CI but not locally" environment differences
→ Easy to define the exact environment (a container image with the needed tools)
