openedx / wg-devops

Issue repository for the DevOps Working Group
1 stars 1 forks source link

Profile Docker image build #20

Open kdmccormick opened 1 year ago

kdmccormick commented 1 year ago

Backgroud

I'd like to "profile" a docker build. The ideal output would include elapsed time, download size, and final layer size for every command in the Dockerfile. End goal is to find the best optimizations for Tutor's Dockerfiles without relying purely on my hunches about what I believe are the slowest parts.

Subtasks

kdmccormick commented 1 year ago

From Jeremy B:

I've briefly used https://github.com/wagoodman/dive and found it pretty useful. And https://github.com/hadolint/hadolint gives some useful tips also (but won't give you metrics). For elapsed time, https://keeler.github.io/docker-build-profiling/ may be a good starting point

kdmccormick commented 1 year ago

Directly relates to https://github.com/openedx/wg-devops/issues/6