otomi-core
otomi-core copied to clipboard
Moz/refactor/dockerfiles
splits up dockerfiles and compresses their builds to minimize size:
otomi/core: 1.7Gi before 1.2Gi after
you may inspect the Dockerfiles? It is not complex. As the description mentions: it saves 500MB size when leaving out unnecesary tools, but it adds this setup to maintain. Will be beneficial when we get traction
yes, we will do it in this week.
We should consider using this tool: https://github.com/docker-slim/docker-slim
Tnx @diabhey for the suggestions. I rejected them in favor of shellcheck exclusions for our Dockerfile(s). String split should only warn.
I prefer not to. I think we should use minimal base images that are secure. We are not in need of creating base images ourselves
On Tue, 17 May 2022 at 08:17, Abhimanyu Selvan @.***> wrote:
We should consider using this tool: https://github.com/docker-slim/docker-slim
— Reply to this email directly, view it on GitHub https://github.com/redkubes/otomi-core/pull/706#issuecomment-1128457251, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHF6KMVPGTGQSQQQNV7E33VKM2XTANCNFSM5LIHYOHA . You are receiving this because you authored the thread.Message ID: @.***>
you may inspect the Dockerfiles? It is not complex. As the description mentions: it saves 500MB size when leaving out unnecesary tools, but it adds this setup to maintain. Will be beneficial when we get traction
I inspected them but it is a bit convoluted, because they are released in many places, so it is difficult to grasp an idea and check if order of build pipeline is correct. So far I see that there are four container images now:
- core
- base
- tools
- cli How do they depend on each other?
Btw, it does not sound like high priority now, doesn't it?
you may inspect the Dockerfiles? It is not complex. As the description mentions: it saves 500MB size when leaving out unnecesary tools, but it adds this setup to maintain. Will be beneficial when we get traction
I inspected them but it is a bit convoluted, because they are released in many places, so it is difficult to grasp an idea and check if order of build pipeline is correct. So far I see that there are four container images now:
- core
- base
- tools
- cli How do they depend on each other?
C'mon, those dockerfiles are easy to read. What do you not get? Only core is split to also deliver cli
Btw, it does not sound like high priority now, doesn't it?
Not really, but saving 500Mb is quite a lot, so it would be beneficial for many reasons. Having all nodes pulling the otomi container when assigned a drone runner is costly.