Skip to content

Commit

Permalink
Avoid failure on ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
dappnodedev authored and alexpeterson91 committed Apr 14, 2024
1 parent e5470b8 commit d2d7af9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 8 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit d2d7af9

Please sign in to comment.