New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: docker build --profile report for step duration and layer size #36555
Comments
There's an open PR (but still WIP) to report elapsed time per build-step #35549 However, plans are to integrate BuildKit, which supports open tracing; https://github.com/moby/buildkit#opentracing-support (see moby/buildkit#255), which would provide much more detailed information on build; example screenshot from that PR: /cc @tonistiigi |
Interesting topic, recently I am seeking for a tool to evaluate the build profile result like @jadametz posted... 😄 |
@thaJeztah thanks for responding and pointing out the other issue. @maurorappa good idea and thanks for getting it started! Are either of you able to speak to if the work is still in progress, as it seems to have been stagnant for a few months. Is there any chance of getting the timing data summarized at the bottom of the build? While I actually like the suggestion to include it inline, I fear abstracting it from after each step would be rather difficult, especially for large or noisy builds. Additionally, I think layer size would be useful. Should I carry that suggestion to #35549 or should this issue turn into that feature request? |
I just left a comment on that PR, but if I recall correctly, tests were failing, because they need an update to match the new output format.
While I see a use for this, I'm a bit cautious with adding the new output as a feature if integration with BuildKit would make it redundant. Note that if should not be too difficult to get the timing from the output (given the Let me /cc @tonistiigi on that as well |
In case anyone finds this while searching for a way to profile docker builds, the solution given in moby/buildkit#255 requires So, I wrapped buildkit and Jaeger into a docker-in-docker image which should "just work" even outside of Linux. It works great on my Linux machine but I am unable to confirm if it works on another OS. If you give it a try let me know! |
📃 Description:
I'd like to see
docker build --profile
exist to generate a report at the end of a build that contains each step, the duration that step took to execute, and the layer size added to the image during that stage.☑️ Steps to produce the desired outcome:
docker build -t repo/imagename:tag --profile .
🎉 Describe the results you expect:
🙏 Guidance:
I'd love to work on this as my first contribution if the maintainers think it's a good idea. I'm thinking it'll at least require a PR here and in docker/cli. I'm confident I'll need guidance on where to make these changes (assuming they're possible) 😄.
Additionally, if this PR is better suited to be opened elsewhere, just let me know!
The text was updated successfully, but these errors were encountered: