about summary refs log tree commit diff
path: root/universe/docker/cloud_run.nix
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-01-29T14·29+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-01-29T14·29+0000
commitfb9380ba268b3cd27372acadb87b14cc96163374 (patch)
treef65d7fc8d8726499165a0949af39afd1abc8118c /universe/docker/cloud_run.nix
parent15110e6de9f85537c7847267caa35fa068aea001 (diff)
parent8ad51b24dd8719840aac47134835ea25cfe1b0b8 (diff)
Add 'universe/' from commit '8ad51b24dd8719840aac47134835ea25cfe1b0b8'
git-subtree-dir: universe
git-subtree-mainline: 15110e6de9f85537c7847267caa35fa068aea001
git-subtree-split: 8ad51b24dd8719840aac47134835ea25cfe1b0b8
Diffstat (limited to 'universe/docker/cloud_run.nix')
-rw-r--r--universe/docker/cloud_run.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/universe/docker/cloud_run.nix b/universe/docker/cloud_run.nix
new file mode 100644
index 000000000000..70be4040c36b
--- /dev/null
+++ b/universe/docker/cloud_run.nix
@@ -0,0 +1,18 @@
+{
+  pkgs ? import <nixpkgs> {},
+  depot ? import <depot> {},
+  ...
+}:
+
+pkgs.dockerTools.buildLayeredImage {
+  name = "gemma";
+  tag = "latest";
+  config.ExposedPorts = {
+    "4242" = {};
+  };
+  config.Env = [
+    "GEMMA_CONFIG=${./config.lisp}"
+  ];
+  config.Cmd = [ "${depot.fun.gemma}/bin/gemma" ];
+  maxLayers = 120;
+}