4 ms·
Do you have an example or an article demonstrating this? I just recently had the desire to build systemd-nspawn images declaratively, but couldn't find much oth
by webstrand 4y ago
Do you have an example or an article demonstrating this? I just recently had the desire to build systemd-nspawn images declaratively, but couldn't find much other than Dockerfiles.
- kevincox 4y agoSure. Putting a simple binary in a container: https://gitlab.com/kevincox/tiles/-/blob/a2b907eab7a84989c9484973c8941aac95472e25/default.nix#L100-111 https://gitlab.com/kevincox/tiles/-/blob/a2b907eab7a84989c94.... This is the trivial case where you just stick the main executable in the command string. Nix will automatically include the dependencies. The GitLab CI example is a bit more complex. It requires some commands that are unused by the image and some config files: https://gitlab.com/kevincox/nix-ci/-/blob/efe6f4deedc50c2474cb99fef13242e70bf09e51/default.nix#L51-71 https://gitlab.com/kevincox/nix-ci/-/blob/efe6f4deedc50c2474...
- rgoulter 4y agohttps://lethalman.blogspot.com/2016/04/cheap-docker-images-with-nix_15.html https://lethalman.blogspot.com/2016/04/cheap-docker-images-w...