Setup for local build debugging #1974
pointlessone
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Clipped logs make it very hard to debug builds.
There are ENV variables to pass to buildkit (through buildx) that can extend max log size (or disable clipping entirely) but this requires creation of a new builder (
docker buildx create --driver-opt env.BUILDKIT_STEP_LOG_MAX_SIZE=-1 ...
). The issue with this approach is that it creates an isolated builder that doesn't have access to local caches. This means that rebuilds fetch base images all the time, don't have access to previously built layers and need special treatment to even make the resulting image available in the local docker environment (i.e.--load
). In short,docker build ...
anddocker build --builder builder-with-unlimited-logs ...
are two very different commands and are not at all similar and this makes debugging very inconvenient indeed.As an aside,
--cache-from
and--cache-to
do not behave even close to caching in the defaultdocker build
.So the question is how do I get a convenient local set up?
I want decent caching for faster repeated rebuilds and I want infinite logs. Is there a way to get both?
Beta Was this translation helpful? Give feedback.
All reactions