Docker: Difference between revisions

imported>Yeshey
No edit summary
imported>Jooooscha
Add example for Arion (docker compose)
Line 70: Line 70:
== Docker Compose with Nix ==
== Docker Compose with Nix ==


[https://docs.hercules-ci.com/arion/ Arion] is optimized for running Nix-based projects in Docker Compose. It uses the NixOS module system for configuration, it can bypass <code>docker build</code> and lets you use dockerTools or use the store directly in the containers. The images/containers can be typical dockerTools style images or full NixOS configs.
[https://docs.hercules-ci.com/arion/ Arion] is created for running Nix-based projects in Docker Compose. It uses the NixOS module system for configuration, it can bypass <code>docker build</code> and lets you use dockerTools or use the store directly in the containers. The images/containers can be typical dockerTools style images or full NixOS configs.
 
To use Arion, you first need to add its module to you NixOS configuration:
 
  modules = [ arion.nixosModules.arion ];
 
After that you can access its options under
 
  virtualisation.arion = {}
 
 
A config for a simple container could look like this:
 
  virtualisation.arion = {
    backend = "docker";
    projects = {
      "db" = settings.services."db".service = {
        image = "";
        restart = "unless-stopped";
        environment = { POSTGRESS_PASSWORD = "password"; };
      };
    };
  };


== See also ==
== See also ==