summaryrefslogtreecommitdiff
path: root/nix/containerize.nix
blob: b936b90f725420579ad8b754f41c77392a377530 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ lib, dockerTools }:

let
  containerize =
    chill-discord-bot:

    let
      inherit (chill-discord-bot.passthru) crossPkgs;
      architecture = crossPkgs.go.GOARCH;
    in

    dockerTools.buildLayeredImage {
      name = "chill-discord-bot";
      tag = "latest-${architecture}";
      contents = [ dockerTools.caCertificates ];
      config.Cmd = [ (lib.getExe chill-discord-bot) ];
      inherit architecture;
    };
in

containerize