summaryrefslogtreecommitdiff
path: root/nix/containerize.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/containerize.nix')
-rw-r--r--nix/containerize.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/nix/containerize.nix b/nix/containerize.nix
new file mode 100644
index 0000000..8175e17
--- /dev/null
+++ b/nix/containerize.nix
@@ -0,0 +1,17 @@
+{ lib, dockerTools }:
+let
+ containerize =
+ teawie-bot:
+ let
+ inherit (teawie-bot.passthru) crossPkgs;
+ architecture = crossPkgs.go.GOARCH;
+ in
+ dockerTools.buildLayeredImage {
+ name = "teawie-bot";
+ tag = "latest-${architecture}";
+ contents = [ dockerTools.caCertificates ];
+ config.Cmd = [ (lib.getExe teawie-bot) ];
+ inherit architecture;
+ };
+in
+containerize