diff options
Diffstat (limited to 'nix/dev/docker.nix')
| -rw-r--r-- | nix/dev/docker.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/nix/dev/docker.nix b/nix/dev/docker.nix new file mode 100644 index 0000000..b209015 --- /dev/null +++ b/nix/dev/docker.nix @@ -0,0 +1,25 @@ +{withSystem, ...}: { + perSystem = { + lib, + pkgs, + self', + ... + }: let + containerFor = arch: + pkgs.dockerTools.buildLayeredImage { + name = "teawiebot"; + tag = "latest-${arch}"; + contents = [pkgs.dockerTools.caCertificates]; + config.Cmd = [ + (lib.getExe self'.packages."teawiebot-static-${arch}") + ]; + + architecture = withSystem "${arch}-linux" ({pkgs, ...}: pkgs.pkgsStatic.go.GOARCH); + }; + in { + packages = { + container-x86_64 = containerFor "x86_64"; + container-aarch64 = containerFor "aarch64"; + }; + }; +} |
