Extend bsc Dockerfile for additional dependencies

This commit is contained in:
Prathamesh Musale 2024-06-04 19:05:49 +05:30
parent d9210326d0
commit 082566f7c9
5 changed files with 23 additions and 3 deletions

View File

@ -1,6 +1,6 @@
services:
bsc:
image: ghcr.io/bnb-chain/bsc:1.4.8
image: cerc/bsc-geth:local
restart: unless-stopped
environment:
CERC_BSC_NETWORK: ${CERC_BSC_NETWORK:-mainnet}

View File

@ -28,9 +28,9 @@ if [ ! -d "$geth_dir" ] && [ "${CERC_USE_SNAPSHOT}" = "true" ] && [ -n "$snapsho
if [ "$CERC_BSC_NETWORK" = "testnet" ]; then
# Snapshot dir structure for testnet is different than that for mainnet
tar -C /${DATA_DIR}/ -I lz4 -xvf ${snapshot_file} --strip-components=3 server/testnet/dataseed/geth
lz4 -d ${snapshot_file} | tar -C ${DATA_DIR}/ -xvf - --strip-components=3 server/testnet/dataseed/geth
else
tar -C /${DATA_DIR}/ -I lz4 -xvf ${snapshot_file} --strip-components=2 server/data-seed/geth
lz4 -d ${snapshot_file} | tar -C ${DATA_DIR}/ -xvf - --strip-components=2 server/data-seed/geth
fi
if [ "${CERC_FAST_NODE}" = "true" ]; then

View File

@ -0,0 +1,5 @@
FROM ghcr.io/bnb-chain/bsc:1.4.8
USER root
RUN apk add lz4
USER bsc

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# Build cerc/bsc-geth
docker build -t cerc/bsc-geth:local ${build_command_args} ${SCRIPT_DIR}

View File

@ -0,0 +1,8 @@
version: "1.0"
name: bsc-node
description: "BSC node stack"
repos:
containers:
- cerc/bsc-geth
pods:
- bsc-node