Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #42 from dappnode/diego/fix-arm-build
Browse files Browse the repository at this point in the history
Fix ARM build (curl install fails)
  • Loading branch information
dsimog01 authored Jul 12, 2023
2 parents a6c89c7 + 91f2fbc commit d9eb1a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ COPY security /security
COPY entrypoint.sh /usr/local/bin/entrypoint.sh

USER root
RUN apt update && apt install curl -y

# curl install throws error in ARM64 arch. It should not prevent build
RUN apt update && apt install -y curl || true

RUN mkdir /var/lib/goerli-besu
RUN chown -R besu:besu /var/lib/goerli-besu

USER besu

ENV BESU_OPTS=$BESU_OPTS

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
11 changes: 8 additions & 3 deletions build/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ case "$_DAPPNODE_GLOBAL_CONSENSUS_CLIENT_PRATER" 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
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 besu --rpc-ws-host='0.0.0.0' \
--network=goerli \
Expand Down

0 comments on commit d9eb1a3

Please sign in to comment.