opensafely-core / research-template-docker

This provides the devcontainer Docker image used by repos created from the OpenSAFELY research template.
Other
0 stars 0 forks source link

See if `zstandard` compression works better than `gzip` for the image build #34

Closed StevenMaude closed 1 month ago

StevenMaude commented 1 month ago

Does it speed up the CI more than using pigz?

Building and loading Docker images supports this:

https://docs.docker.com/build/exporters/#compression https://docs.docker.com/reference/cli/docker/image/load/

Discussion: https://bennettoxford.slack.com/archives/C069SADHP1Q/p1717067259731309

StevenMaude commented 1 month ago

My rough guess, GitHub Actions runner performance varies a bit, is that switching pigz --fast for zstd --fast is about a 20-30 second saving on the first build step.

Will try buildx just to rule it out; locally, it seemed much slower than piping into zstd.

Edit: I can get, I think, a zstd compression image built from buildx, but saving that is either not possible or not obvious. I've skimmed a lot of this issue: https://github.com/moby/moby/issues/28394. So will abandon this.