summaryrefslogtreecommitdiff
path: root/nix/containerize.nix
blob: 2be02efe3278fafc2677da1426f5f17c8d3aaa14 (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 =
    moyai-discord-bot:

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

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

containerize