Fixes docker image. (#448)

This commit is contained in:
Ben Bierens 2023-06-19 11:00:21 +02:00 committed by GitHub
parent 8c232b6759
commit db7c4b5811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -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

View File

@ -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"