From 10bdee10cf6947ec6dd0ba5040d7274d6c3316a7 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 26 Sep 2023 09:32:28 +0200 Subject: build a container from nix --- flake.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 7746634..5d69f9f 100644 --- a/flake.nix +++ b/flake.nix @@ -18,7 +18,7 @@ ]; }; src = ./.; - bottin = pkgs.buildGoApplication { + guichet = pkgs.buildGoApplication { pname = "guichet"; version = "0.1.0"; src = src; @@ -38,9 +38,16 @@ platforms = platforms.linux; }; }; + container = pkgs.dockerTools.buildImage { + name = "dxflrs/guichet"; + config = { + Entrypoint = "${guichet}/bin/guichet"; + }; + }; in { - packages.x86_64-linux.bottin = bottin; - packages.x86_64-linux.default = bottin; + packages.x86_64-linux.guichet = guichet; + packages.x86_64-linux.container = container; + packages.x86_64-linux.default = guichet; devShell.x86_64-linux = pkgs.mkShell { nativeBuildInputs = [ pkgs.go pkgs.gomod2nix ]; }; }; -- cgit v1.2.3