Interview Prep/Python for DevOps/Testing, CI/CD, packaging & services

Your Python tool works in Docker on your laptop (arm64 Mac) but CI on x86 fails with `exec format error`. What happened?

IntermediateScenarioTesting, CI/CD, packaging & services
Answer

Situation read → The image was built for arm64 and pushed, then run on amd64.

What I'd do →

  1. Build multi-arch: docker buildx build --platform linux/amd64,linux/arm64 -t repo:tag --push ..
  2. Or build in CI on amd64 runners only and never push from laptops.
  3. Check with docker manifest inspect repo:tag or docker buildx imagetools inspect.

Why → Images are architecture-specific unless built as multi-arch manifests.

Interview tip → Say "CI builds images, laptops don't push".

All Python for DevOps questions Roadmap: Python for automation

More on Testing, CI/CD, packaging & services