diff --git a/.gitignore b/.gitignore index 819d819..85080cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /result-bin +/result diff --git a/docker.nix b/docker.nix new file mode 100644 index 0000000..109b2e1 --- /dev/null +++ b/docker.nix @@ -0,0 +1,21 @@ +{ system ? builtins.currentSystem }: + +let + pkgs = import { }; + callPackage = pkgs.lib.callPackageWith pkgs; + printerfacts = callPackage ./default.nix { }; + + dockerImage = pkg: + pkgs.dockerTools.buildLayeredImage { + name = "xena/quickserv"; + tag = "latest"; + + contents = [ pkg ]; + + config = { + Cmd = [ "/bin/quickserv" ]; + WorkingDir = "/"; + }; + }; + +in dockerImage printerfacts