Skip to content

Commit

Permalink
flake: add docker-image output
Browse files Browse the repository at this point in the history
  • Loading branch information
marijanp committed Aug 29, 2024
1 parent 3075775 commit 2246406
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
41 changes: 41 additions & 0 deletions docker-image.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{ dockerTools
, cctld
, lib
,
}:
dockerTools.buildLayeredImage {
name = "ghcr.io/cspr-rad/cctl-rs";
tag = "cctl-casper-node-1.5.7";
extraCommands = ''
mkdir -p tmp
'';
config = {
Cmd = lib.getExe cctld;
ExposedPorts = {
# RPC ports
"11101/tcp" = { };
"11102/tcp" = { };
"11103/tcp" = { };
"11104/tcp" = { };
"11105/tcp" = { };
# REST ports
"14101/tcp" = { };
"14102/tcp" = { };
"14103/tcp" = { };
"14104/tcp" = { };
"14105/tcp" = { };
# SSE ports
"18101/tcp" = { };
"18102/tcp" = { };
"18103/tcp" = { };
"18104/tcp" = { };
"18105/tcp" = { };
# Consensus ports
"22101/tcp" = { };
"22102/tcp" = { };
"22103/tcp" = { };
"22104/tcp" = { };
"22105/tcp" = { };
};
};
}
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@
});

default = self'.packages.cctld;

cctl-docker-image = pkgs.callPackage ./docker-image.nix { inherit (self'.packages) cctld; };
};

checks = {
Expand Down

0 comments on commit 2246406

Please sign in to comment.