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 →
- Build multi-arch:
docker buildx build --platform linux/amd64,linux/arm64 -t repo:tag --push .. - Or build in CI on amd64 runners only and never push from laptops.
- Check with
docker manifest inspect repo:tagordocker buildx imagetools inspect.
Why → Images are architecture-specific unless built as multi-arch manifests.
Interview tip → Say "CI builds images, laptops don't push".
More on Testing, CI/CD, packaging & services
You join a team whose Python automation repo has no tests. Where do you start?BeginnerYour pytest suite takes 12 minutes. How do you speed it up?IntermediateA test passes locally but fails in CI only when run with the rest of the suite. What do you suspect?IntermediateYou want a reusable CI pipeline for 15 Python tool repos. What goes in it?IntermediateYour Python Docker image is 1.1 GB. How do you shrink it?IntermediateYou want to distribute an internal CLI to 200 engineers. What are your options?Intermediate