From ff06ffcf9cd8ad78f0dcc7df4e6bbfa684e73f1e Mon Sep 17 00:00:00 2001 From: William Carroll Date: Tue, 28 Jan 2020 16:47:35 +0000 Subject: Package depot's gemma as a docker image for Cloud Run Using 's gemma project with `dockerTools.buildLayeredImage` because I need access to a nix-packaged server and gemma is the first thing that comes to mind. --- docker/cloud_run.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'docker/cloud_run.nix') diff --git a/docker/cloud_run.nix b/docker/cloud_run.nix index 02440df08872..70be4040c36b 100644 --- a/docker/cloud_run.nix +++ b/docker/cloud_run.nix @@ -1,9 +1,18 @@ -# Attempting to build a Docker image with Nix to run using Google Cloud Run. -{ pkgs ? import {}, ... }: +{ + pkgs ? import {}, + depot ? import {}, + ... +}: pkgs.dockerTools.buildLayeredImage { - name = "mysql"; + name = "gemma"; tag = "latest"; - config.Cmd = [ "${pkgs.mysql}/bin/mysqld" ]; + config.ExposedPorts = { + "4242" = {}; + }; + config.Env = [ + "GEMMA_CONFIG=${./config.lisp}" + ]; + config.Cmd = [ "${depot.fun.gemma}/bin/gemma" ]; maxLayers = 120; } -- cgit 1.4.1