Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
docker images: add morpho node docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
picnoir committed Nov 19, 2020
1 parent ffa6b4d commit 622b5a8
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docker/morpho.nix
@@ -0,0 +1,28 @@
{ lib, buildLayeredImage, mkEnv, morpho-node, coreutils, gnused, gnugrep, writeShellScript }:
let run-morpho-node =
writeShellScript "morpho-node" ''
set -exuo pipefail
mkdir -p /tmp
cd "$NOMAD_TASK_DIR"
chown --reference . --recursive . || true
ulimit -c unlimited
exec morpho-checkpoint-node \
--topology "$NOMAD_TASK_DIR"/morpho-topology.json \
--database-path /local/db \
--port 3000 \
--config "$NOMAD_TASK_DIR"/morpho-config.yaml \
--socket-dir "$NOMAD_TASK_DIR/socket" \
"$@"
'';
in {
morpho = buildLayeredImage {
name = "docker.mantis.ws/morpho-node";
config = {
Entrypoint = [ run-morpho-node ];
Env = mkEnv { PATH = lib.makeBinPath [ coreutils gnugrep gnused morpho-node ]; };
};
};
}

0 comments on commit 622b5a8

Please sign in to comment.