diff options
| author | Fuwn <[email protected]> | 2021-05-06 00:22:02 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-06 00:22:02 +0000 |
| commit | cfb54fcd29fb25f12c483897873fb98f85269d3b (patch) | |
| tree | 564b20278d8125bde58cec07cfe79b4537f37d2b /docker.nix | |
| parent | chore(global): create version file (diff) | |
| download | whirl-cfb54fcd29fb25f12c483897873fb98f85269d3b.tar.xz whirl-cfb54fcd29fb25f12c483897873fb98f85269d3b.zip | |
feat(nix): spice it all up
Diffstat (limited to 'docker.nix')
| -rw-r--r-- | docker.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docker.nix b/docker.nix new file mode 100644 index 0000000..2bee934 --- /dev/null +++ b/docker.nix @@ -0,0 +1,23 @@ +{ system ? builtins.currentSystem }: + +let + sources = import ./nix/sources.nix; + pkgs = import sources.nixpkgs { }; + callPackage = pkgs.lib.callPackageWith pkgs; + whirl = callPackage ./default.nix { }; + + dockerImage = pkg: + pkgs.dockerTools.buildLayeredImage { + name = "Whirlsplash/whirl"; + tag = "latest"; + + contents = [ pkg ]; + + config = { + Cmd = [ "/bin/whirl" ]; + WorkingDir = "/"; + Env = [ ]; + }; + }; + +in dockerImage whirl |