Update dockerfile with step to copy init script
All checks were successful
Integration Tests / test-integration (pull_request) Successful in 2m53s
Build / build (pull_request) Successful in 3m10s
E2E Tests / test-e2e (pull_request) Successful in 4m24s
Unit Tests / test-unit (pull_request) Successful in 2m12s
SDK Tests / sdk_tests_nameservice_expiry (pull_request) Successful in 7m26s
SDK Tests / sdk_tests_auctions (pull_request) Successful in 13m59s
SDK Tests / sdk_tests (pull_request) Successful in 8m29s

This commit is contained in:
Adw8 2024-08-01 14:41:06 +05:30
parent c162396298
commit b4444a1c51
2 changed files with 10 additions and 0 deletions

View File

@ -25,6 +25,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Copy over binary from the builder
COPY --from=builder /go/src/git.vdb.to/cerc-io/laconicd/build/laconicd /usr/bin/laconicd
# Copy over init script from builder
COPY --from=builder /go/src/git.vdb.to/cerc-io/laconicd/scripts/init.sh scripts/init.sh
WORKDIR /
# Run laconicd by default

View File

@ -6,6 +6,8 @@ MONIKER="localtestnet"
KEYRING="test"
LOGLEVEL="${LOGLEVEL:-info}"
input_genesis_file=${GENESIS_FILE}
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
# validate dependencies are installed
command -v jq > /dev/null 2>&1 || {
@ -29,6 +31,11 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
laconicd init $MONIKER --chain-id $CHAINID --default-denom alnt
if [ -f ${input_genesis_file} ]; then
# Use provided genesis config
cp $input_genesis_file $HOME/.laconicd/config/genesis.json
fi
update_genesis() {
jq "$1" $HOME/.laconicd/config/genesis.json > $HOME/.laconicd/config/tmp_genesis.json &&
mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json