maj/docker.nix

25 lines
487 B
Nix
Raw Permalink Normal View History

2020-07-26 01:24:47 +00:00
{ system ? builtins.currentSystem }:
let
pkgs = import <nixpkgs> { };
callPackage = pkgs.lib.callPackageWith pkgs;
crates = callPackage ./default.nix { };
dockerImage = pkg:
pkgs.dockerTools.buildLayeredImage {
name = "xena/${pkg.name}";
tag = "latest";
contents = [ pkg ];
config = {
Cmd = [ "/bin/${pkg.name}" ];
WorkingDir = "/";
};
};
in {
majc = dockerImage crates.majc;
majsite = dockerImage crates.majsite;
}