diff --git a/operator/Dockerfile b/operator/Dockerfile index cb12ac0..0d855ec 100644 --- a/operator/Dockerfile +++ b/operator/Dockerfile @@ -17,7 +17,7 @@ COPY entrypoint.sh /usr/local/bin/entrypoint.sh ADD ${STAKER_SCRIPTS_URL}/dvt_lsd_tools.sh /etc/profile.d/ RUN apt-get update && \ - apt-get install -y curl && \ + apt-get install -y curl jq && \ apt-get clean && \ chmod +rx /etc/profile.d/dvt_lsd_tools.sh /usr/local/bin/entrypoint.sh diff --git a/operator/entrypoint.sh b/operator/entrypoint.sh index 4b9702b..8744734 100755 --- a/operator/entrypoint.sh +++ b/operator/entrypoint.sh @@ -53,6 +53,9 @@ if [ "${SETUP_MODE}" = "Import Operator" ]; then echo "[DEBUG] encrypted_private_key.json doesn't exist, restarting" exit 1 fi + + # Extract the public key from the imported encrypted_private_key.json + jq -r '.pubKey' "$KEY_FILE_PATH" > "$PUBLIC_KEY_FILE_PATH" fi # If New Operator, generate a new public-private key pair during the first time setup