From d2d7af9935ec8b554d32522f2c125ee4ee070be4 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Mon, 9 Oct 2023 12:53:30 +0200 Subject: [PATCH] Avoid failure on ARM --- Dockerfile | 3 ++- entrypoint.sh | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2d97c0f..91b0deb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ ARG UPSTREAM_VERSION FROM nethermind/nethermind:${UPSTREAM_VERSION} -RUN apt update && apt install -y curl +# curl install throws error in ARM64 arch. It should not prevent build +RUN apt update && apt install -y curl || true COPY /security /security COPY entrypoint.sh /usr/local/bin/entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh index db1fae3..70c20d8 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -27,9 +27,14 @@ case "$_DAPPNODE_GLOBAL_CONSENSUS_CLIENT_MAINNET" in ;; esac -# Print the jwt to the dappmanager -JWT=$(cat $JWT_PATH) -curl -X POST "http://my.dappnode/data-send?key=jwt&data=${JWT}" +# Check if curl is installed (not installed in ARM64 arch) +if command -v curl >/dev/null 2>&1; then + # Print the jwt to the dappmanager + JWT=$(cat $JWT_PATH) + curl -X POST "http://my.dappnode/data-send?key=jwt&data=${JWT}" +else + echo "curl is not installed in ARM64 arch. Skipping the JWT post to package info." +fi exec /nethermind/nethermind \ --JsonRpc.Enabled=true \