docker build

This commit is contained in:
Cadey Ratio 2020-02-18 17:50:57 +00:00
parent cde2c24e27
commit 90d302ee70
2 changed files with 22 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/result-bin
/result

21
docker.nix Normal file
View File

@ -0,0 +1,21 @@
{ system ? builtins.currentSystem }:
let
pkgs = import <nixpkgs> { };
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