NixOS Containers: Difference between revisions

imported>Roberth
m NixOS manual chapter numbers change over time, so omit the number
imported>Chrissound
No edit summary
Line 1: Line 1:
There's not much to read here. Look at {{manual:nixos|sec=#ch-containers|chapter=the upstream documentation on containers}} meanwhile.
There's not much to read here. Look at {{manual:nixos|sec=#ch-containers|chapter=the upstream documentation on containers}} meanwhile.
== Declarative docker contianers ==
Example config:
  { config, pkgs, ... }:
  {
    config.docker-containers = {
      hackagecompare = {
        image = "chrissound/hackagecomparestats-webserver:latest";
        ports = ["127.0.0.1:3010:3010"];
        volumes = [
          "/root/hackagecompare/packageStatistics.json:/root/hackagecompare/packageStatistics.json"
        ];
        cmd = [
          "--base-url"
          "\"/hackagecompare\""
        ];
      };
    };
  }


== Troubleshooting ==
== Troubleshooting ==