mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-04 08:26:42 +00:00
9f44acf8e384376eaa46cd5355360ed521d718dd
All of the `output*` functions took a `[]byte` and immediately wrapped it in a `bytes.Buffer` to produce an `io.Reader`. Make them take an `io.Reader` instead and satisfy this further up the call chain by directing `moby.Build` to output to a temp file instead of another `bytes.Buffer`. In my test case (building kube master image) this reduces Maximum RSS (as measured by time(1)) from 6.7G to 2.8G and overall allocations from 9.7G to 5.3G. When building a tar (output to /dev/null) the Maximum RSS fell slightly from 2.2G to 2.1G. Overall allocations remained stable at around 5.3G. Signed-off-by: Ian Campbell <ijc@docker.com>
Description
A toolkit for building secure, portable and lean operating systems for containers
241 MiB
Languages
Go
48.3%
text
21.3%
Shell
14%
Dockerfile
5.7%
OCaml
4.6%
Other
6.1%