cyvive / agnostic

Software Agnostic Development Accelerator
Mozilla Public License 2.0
1 stars 2 forks source link

extend basal image with buildLayeredImage #14

Open keidrych opened 5 years ago

keidrych commented 5 years ago

Nix has an ability to use graph to build highly optimized images that have a significantly higher caching ability than normal images.

Currently when needing to add additional programs to the base image we are using the nix buildImage package to add a new layer ontop of the existing layered base image. Its suboptimal.

We should be building another layered base image via buildLayeredImage and merging the two images together (this is a safe operation due to the way nix builds the layers).

Additional information: https://grahamc.com/blog/nix-and-layered-docker-images https://dille.name/blog/2018/08/19/how-to-reduce-the-build-time-of-a-monolithic-docker-image/ https://dille.name/blog/2018/09/07/how-to-automate-the-merging-of-layers-from-docker-images-in-powershell/