about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2017-12-31T16·02+0100
committerVincent Ambo <tazjin@gmail.com>2017-12-31T16·02+0100
commitcc6de0f9c6792413a58031b74190ad358a2b6efd (patch)
tree31d3e5115fe4a5b16eccc258fe102178ddf12449
parent48687f77d2e838907f73e503bef709ff1fd0f51a (diff)
feat(nix): Add Docker building configuration
-rw-r--r--gemma-docker.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/gemma-docker.nix b/gemma-docker.nix
new file mode 100644
index 000000000000..69cfdd4c1692
--- /dev/null
+++ b/gemma-docker.nix
@@ -0,0 +1,19 @@
+with import <nixpkgs> {}; 
+let
+  gemma = import ./default.nix;
+  entrypoint = writeScript "entrypoint.sh" ''
+    #!${stdenv.shell}
+    set -e
+    exec ${gemma}/bin/gemma
+  '';
+in dockerTools.buildImage {
+  name = "gemma";
+  contents = gemma; # [ gemma ];
+  config = {
+    Entrypoint = [ entrypoint ];
+    WorkingDir = "/data";
+    Volumes = {
+      "/data" = {};
+    };
+  };
+}