Skip to content

Commit

Permalink
Speedup --reproducible layer stripping
Browse files Browse the repository at this point in the history
Fixes GoogleContainerTools#862, may mitigate GoogleContainerTools#1960

The layerTime function returns a layer backed by an in-memory buffer, which means during
the stripping of timestamps the entire image is loaded into memory. Additionally, it runs
gzip after the layer is created, resulting in even an even larger in-memory blob.

This commit changes this method to use a temporary file instead of an in-memory buffer,
and to use gzip compression while writing to this layer file, instead of compressing during read.

Signed-off-by: bh <[email protected]>
  • Loading branch information
bh-tt committed Oct 22, 2024
1 parent e328007 commit bf29b29
Showing 1 changed file with 15 additions and 7 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bf29b29

Please sign in to comment.