4 ms·
You can run containers on NixOS (also through systemd) and get the same benefits explained in this article. NixOS supports both Podman and Docker as a runtime.
by Cyph0n 3y ago
You can run containers on NixOS (also through systemd) and get the same benefits explained in this article. NixOS supports both Podman and Docker as a runtime. There is also the option to run native NixOS containers. See: https://nixos.wiki/wiki/NixOS_Containers https://nixos.wiki/wiki/NixOS_Containers.
The Docker Compose story is a bit rough around the edges, though. I’m actually working on a tool to automatically convert a Compose project into a NixOS config you can import as-is. Still kinda early, but the basic skeleton works: https://github.com/aksiksi/compose2nix https://github.com/aksiksi/compose2nix. You can see a sample output file here: https://github.com/aksiksi/compose2nix/blob/main/testdata/TestDocker_out.nix https://github.com/aksiksi/compose2nix/blob/main/testdata/Te....
- lvncelot 3y agoThis is what I'm using, I've written a module for Podman pods (which behave a bit like docker-compose stacks, though with a lit less powerful networking). You can also run NixOS containers[1] - so you have a "real" NixOS configuration for your service that is still separated from the rest of the system via systemd-nspawn. [1]https://nixos.wiki/wiki/NixOS_Containers https://nixos.wiki/wiki/NixOS_Containers
- anyoneamous 3y agoRegarding the linked page about containers: a major gripe of mine is when people make content which includes "don't do this part in production!" - but then never bother to explain what the production equivalent is. If it's out of scope for your guide then fine, but at least provide some keywords and links.