Docker save/load performance

I know this is a rather old thread, but there are in fact ways to speed up the process:

1.) instead of saving each repo:tag individually, use a space seperated list of repo:tag elements as argument. As a result image layer’s will be deduplicated.
2.) use pigz, instead of gzip, to benefit from multithreading, The creation/extraction time can be further optimizied by using the --fast argument with pigz at the cost of the archive size.

The command might look like this:
docker image save ${list of repo:tags} | pigz --fast > ${target_path_to_archive}.tar.gz

2 Likes