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.
More on Build Performance & CI
How do you make Docker builds fast in CI where runners are ephemeral?BeginnerWhat are the cache backends in buildx?BeginnerWhy does `inline` cache often disappoint?AdvancedHow do you structure a Python Dockerfile for the best caching and size?IntermediateHow do you structure a Node.js production image?IntermediateHow do you build a small Java image?Beginner