Interview Prep/Docker/Build Performance & CI

How do you debug a failing build step interactively?

IntermediateProductionBuild Performance & CI
Answer

Build up to the previous stage with --target and run it, or in BuildKit use docker buildx debug build (experimental), or temporarily add a copy of the failing command in a shell. Using the legacy builder, the last successful intermediate image ID was runnable; BuildKit does not print those, so target stages instead.

All Docker questions Roadmap: Docker & containers

More on Build Performance & CI