Use ip utility to get the required miner node multiaddr

This commit is contained in:
Prathamesh Musale 2023-08-14 11:22:21 +05:30
parent 18e45af463
commit 656e67ff03
2 changed files with 2 additions and 3 deletions

View File

@ -33,8 +33,7 @@ echo "Daemon started."
cp /devgen.car /root/.lotus-shared
# publish bootnode peer info to shared volume
# TODO: Improve exporting public address to shared volume
lotus net listen | awk 'NR==4{print}' > /root/.lotus-shared/miner.addr
lotus net listen | grep "$(ip addr | grep inet | grep -v '127.0.0.1' | sort | head -1 | awk '{print $2}' | cut -d '/' -f1)" | head -1 > /root/.lotus-shared/miner.addr
# if miner not already initialized
if [ ! -d $LOTUS_MINER_PATH ]; then

View File

@ -99,7 +99,7 @@ CMD ["-help"]
FROM lotus-base AS lotus-all-in-one
# Install netcat for healthcheck
RUN apt-get update && apt-get install -y netcat
RUN apt-get update && apt-get install -y netcat && apt-get install -y iproute2
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
ENV LOTUS_MINER_PATH /var/lib/lotus-miner