Containrar (Docker) och CI/CD fungerar kraftfullt tillsammans — containrar tillhandahåller konsekventa build/test-miljöer och oföränderliga deployment-artefakter (images), medan CI/CD-pipelines bygger, testar och distribuerar dessa images. Containrar löser viktiga konsistenskproblem i leveransprocessen.
Containrar som konsekventa build/test-miljöer
→ 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)
