From 13de6dc500aa24ae2f32a8e06ece50687d505744 Mon Sep 17 00:00:00 2001 From: Ben Bierens <39762930+benbierens@users.noreply.github.com> Date: Tue, 19 Sep 2023 09:57:39 +0200 Subject: [PATCH] Adds script to inject private key for the purpose of testing. (#553) --- docker/docker-entrypoint.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 0daa249f..95146680 100644 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -6,6 +6,15 @@ if [[ "${NAT_IP_AUTO}" == "true" ]]; then echo "Set CODEX_NAT: ${CODEX_NAT}" fi +# If marketplace is enabled from the testing environment, +# The file has to be written before Codex starts. +if [ -n "${PRIV_KEY}" ]; then + echo ${PRIV_KEY} > "private.key" + chmod 600 "private.key" + export CODEX_ETH_PRIVATE_KEY="private.key" + echo "Private key set" +fi + # Run echo "Run Codex node" exec "$@"