Hi,
I’m working on an application running in Torizon for a Colibri IMX6ULL V1.1A.
All works fine until an upgrade of my development system append.
I get this lines: #1 [internal] load local bake definitions #1 reading from stdin 883B done #1 DONE 0.0s
failed to find target default
AI support drive me to a docker bake problem ( my docker version is 2.39.1) and advice me to put :
“DOCKER_BUILDKIT”: “0” in a appropriate place
This solved my issue but now each compilation rebuild the Torizon image by downloading all things.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Did you like my answer?
Hello! Thank you for your detailed description of the issue.
You’re observing that downgrading BuildKit by setting "DOCKER_BUILDKIT": "0" resolves the Docker bake issue with your Torizon application on the Colibri iMX6ULL, but now this causes the image layers to be rebuilt from scratch with each compilation. This leads to lengthy builds, as Docker cannot reuse previously built layers as it usually does.
Explanation
When you set "DOCKER_BUILDKIT": "0", Docker disables the newer BuildKit engine and reverts to the legacy builder. This older builder may behave differently, especially with multi-stage builds or more complex build chains as commonly seen in Torizon workflows. In such cases, Docker may not be able to cache intermediate layers efficiently, resulting in repeated downloads and builds.
Recommendations & Best Practices
Re-enable BuildKit if Possible
If you can, prefer using BuildKit (DOCKER_BUILDKIT=1) because it is designed for better caching and more efficient builds. Investigate whether your Docker bake issue can be resolved by updating your Docker files, bake definitions, or using a compatible Torizon IDE/extension version.
Dockerfile & .dockerignore Distribution
Ensure your Dockerfile and .dockerignore files are set up correctly. Unnecessary changes to files or lack of a .dockerignore may trigger Docker to invalidate its build cache.
Use Docker Compose and TorizonCore Builder
If your workflow allows, leverage Docker Compose and TorizonCore Builder workflow, which are well integrated with the Torizon platform and designed to maximize consistency and caching.
Clean Up Old Docker Artifacts
Sometimes issues arise from leftover or corrupted Docker cache layers. You can run:
docker system prune
(Be careful as this removes all unused images and containers.)
Check Compatibility
Make sure your Visual Studio Code IDE and Torizon Extension are up-to-date and compatible with your Docker version.
Summary
Using DOCKER_BUILDKIT=0 is a quick workaround, but it degrades build efficiency.
If possible, revert to using BuildKit and resolve the bake issue in the build definition.
Use best practices in Dockerfile setups and cache control.
Refer to Torizon’s guides for recommended workflows: