From 6ae3c252ea64304496a25a47a922ee9a46dfade6 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Tue, 7 Mar 2023 10:08:04 -0700 Subject: [PATCH] Very basic key export/import implementation Former-commit-id: 8a8fef6845edbbde34e561bb1b613df1c5a9cc9b --- app/data/compose/docker-compose-fixturenet-laconicd.yml | 3 ++- app/data/config/fixturenet-laconicd/export-mykey.sh | 2 ++ app/data/container-build/cerc-laconic-registry-cli/Dockerfile | 2 +- app/data/container-build/cerc-laconicd/export-mykey.sh | 2 -- 4 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 app/data/config/fixturenet-laconicd/export-mykey.sh delete mode 100644 app/data/container-build/cerc-laconicd/export-mykey.sh diff --git a/app/data/compose/docker-compose-fixturenet-laconicd.yml b/app/data/compose/docker-compose-fixturenet-laconicd.yml index cfbc574f..9663e7f0 100644 --- a/app/data/compose/docker-compose-fixturenet-laconicd.yml +++ b/app/data/compose/docker-compose-fixturenet-laconicd.yml @@ -5,8 +5,9 @@ services: image: cerc/laconicd:local command: ["sh", "/docker-entrypoint-scripts.d/create-fixturenet.sh"] volumes: - # TODO: look at folding this script into the container + # TODO: look at folding these scripts into the container - ../config/fixturenet-laconicd/create-fixturenet.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh + - ../config/fixturenet-laconicd/export-mykey.sh:/docker-entrypoint-scripts.d/export-mykey.sh # TODO: determine which of the ports below is really needed ports: - "6060" diff --git a/app/data/config/fixturenet-laconicd/export-mykey.sh b/app/data/config/fixturenet-laconicd/export-mykey.sh new file mode 100644 index 00000000..1a5be86e --- /dev/null +++ b/app/data/config/fixturenet-laconicd/export-mykey.sh @@ -0,0 +1,2 @@ +#!/bin/sh +echo y | laconicd keys export mykey --unarmored-hex --unsafe diff --git a/app/data/container-build/cerc-laconic-registry-cli/Dockerfile b/app/data/container-build/cerc-laconic-registry-cli/Dockerfile index bc772d49..cef3b36f 100644 --- a/app/data/container-build/cerc-laconic-registry-cli/Dockerfile +++ b/app/data/container-build/cerc-laconic-registry-cli/Dockerfile @@ -54,7 +54,7 @@ RUN yarn global add @cerc-io/laconic-registry-cli # Add scripts RUN mkdir /scripts ENV PATH="${PATH}:/scripts" -COPY ./import.key.sh /scripts +COPY ./import-key.sh /scripts # Default command sleeps forever so docker doesn't kill it CMD ["sh", "-c", "while :; do sleep 600; done"] diff --git a/app/data/container-build/cerc-laconicd/export-mykey.sh b/app/data/container-build/cerc-laconicd/export-mykey.sh deleted file mode 100644 index a32ac2e6..00000000 --- a/app/data/container-build/cerc-laconicd/export-mykey.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe