From 178de8f496af455f97015f5876c3021b0fb0e95f Mon Sep 17 00:00:00 2001 From: David Boreham Date: Tue, 7 Mar 2023 09:07:15 -0700 Subject: [PATCH] Add simple export/import scheme Former-commit-id: 277be07dcd2bc4473c963119eb5d47d9739b0c21 --- .../container-build/cerc-laconic-registry-cli/Dockerfile | 6 +++++- .../{configure-key.sh => import-key.sh} | 0 app/data/container-build/cerc-laconicd/export-mykey.sh | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) rename app/data/container-build/cerc-laconic-registry-cli/{configure-key.sh => import-key.sh} (100%) create mode 100644 app/data/container-build/cerc-laconicd/export-mykey.sh diff --git a/app/data/container-build/cerc-laconic-registry-cli/Dockerfile b/app/data/container-build/cerc-laconic-registry-cli/Dockerfile index d7042207..bc772d49 100644 --- a/app/data/container-build/cerc-laconic-registry-cli/Dockerfile +++ b/app/data/container-build/cerc-laconic-registry-cli/Dockerfile @@ -51,6 +51,10 @@ RUN npm config set @lirewine:registry ${CERC_NPM_URL} \ # Globally install the cli package RUN yarn global add @cerc-io/laconic-registry-cli +# Add scripts +RUN mkdir /scripts +ENV PATH="${PATH}:/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-laconic-registry-cli/configure-key.sh b/app/data/container-build/cerc-laconic-registry-cli/import-key.sh similarity index 100% rename from app/data/container-build/cerc-laconic-registry-cli/configure-key.sh rename to app/data/container-build/cerc-laconic-registry-cli/import-key.sh diff --git a/app/data/container-build/cerc-laconicd/export-mykey.sh b/app/data/container-build/cerc-laconicd/export-mykey.sh new file mode 100644 index 00000000..a32ac2e6 --- /dev/null +++ b/app/data/container-build/cerc-laconicd/export-mykey.sh @@ -0,0 +1,2 @@ +#!/bin/sh +echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe