Skip to content

Commit

Permalink
Add docker.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
v0d1ch committed Dec 11, 2023
1 parent 0616ff5 commit 7532bae
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
10 changes: 9 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
inherit easyRiderProject system pkgs cardano-node mithril;
};

easyRiderImages = import ./nix/docker.nix {
inherit easyRiderPackages system nixpkgs;
};

prefixAttrs = s: attrs:
with pkgs.lib.attrsets;
mapAttrs' (name: value: nameValuePair (s + name) value) attrs;
Expand All @@ -47,7 +51,11 @@
inherit easyRiderProject;

packages =
{ default = easyRiderPackages.easy-rider; } // easyRiderPackages;
{ default = easyRiderPackages.easy-rider; } //
easyRiderPackages //
prefixAttrs "docker-" easyRiderImages // {
spec = import ./spec { inherit pkgs; };
};

devShells = (import ./nix/shell.nix {
inherit (inputs) cardano-node mithril hydra-node;
Expand Down
18 changes: 18 additions & 0 deletions nix/docker.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{ easyRiderPackages
, system ? builtins.currentSystem
, nixpkgs ? <nixpkgs>
}:
let
pkgs = import nixpkgs { inherit system; };
in
{
easy-rider = pkgs.dockerTools.buildImage {
name = "easy-rider";
tag = "latest";
created = "now";
config = {
Entrypoint = [ "${easyRiderPackages.easy-rider-static}/bin/easy-rider" ];
};
};

}

0 comments on commit 7532bae

Please sign in to comment.