diff --git a/docker/codex.Dockerfile b/docker/codex.Dockerfile index b50ce90d..1c93d615 100644 --- a/docker/codex.Dockerfile +++ b/docker/codex.Dockerfile @@ -11,7 +11,7 @@ RUN make -j4 NIM_PARAMS="-d:disableMarchNative -d:codex_enable_api_debug_peers=t FROM ubuntu:lunar-20230415 WORKDIR /root -RUN apt-get update && apt-get install -y libgomp1 bash +RUN apt-get update && apt-get install -y libgomp1 bash net-tools COPY --from=builder /src/build/codex ./ COPY --from=builder /src/docker/startCodex.sh ./ RUN chmod +x ./startCodex.sh diff --git a/docker/startCodex.sh b/docker/startCodex.sh index 90c13cc6..908df10c 100644 --- a/docker/startCodex.sh +++ b/docker/startCodex.sh @@ -7,7 +7,7 @@ echo "Starting Codex node$NAME" args="" ## Using local ip as NAT -nat_addr=$(ifconfig eth0 | awk '/inet addr/ {gsub("addr:", "", $2); print $2}') +nat_addr=$(ifconfig eth0 | awk '/inet/ {gsub("addr:", "", $2); print $2}') echo "Local IP: $nat_addr" # Required arguments @@ -112,12 +112,10 @@ if [ -n "$CACHE_SIZE" ]; then fi # Ethereum persistence -if [ -n "$ETH_PROVIDER" ] && [ -n "$ETH_ACCOUNT" ] && [ -n "$ETH_MARKETPLACE_ADDRESS" ]; then - echo "Persistence enabled" - args="$args --persistence" +if [ -n "$ETH_PROVIDER" ]; then + echo "Provider: $ETH_PROVIDER" args="$args --eth-provider=$ETH_PROVIDER" - args="$args --eth-account=$ETH_ACCOUNT" - # args="$args --validator" +fi if [ -n "$ETH_ACCOUNT" ]; then echo "Ethereum account: $ETH_ACCOUNT"