HUB
Sign inSign up
bsc logo

11notes/bsc

By 11notes

•Updated almost 3 years ago

binance smart chain

Image
0

1.9K

11notes/bsc repository overview

⁠Alpine :: Binance Smart Chain

size version pulls activity commit-last

Run Binance Smart Chain based on Alpine Linux. Small, lightweight, secure and fast 🏔️

⁠Description

With this image you can run your own BSC node. Easy to use, easy to deploy. You can either use the run example below or use the default configuration. Works on any CPU. Includes CVE fixes which the official repo doesn't address.

⁠Volumes

  • /geth/etc - Directory of config.toml
  • /geth/var - Directory of all blockchain data

⁠Run

docker run --name bsc \
  -v .../var:/geth/var \
  -d 11notes/bsc:[tag] \
    geth \
      --datadir "/geth/var" \
      --config "/geth/etc/config.toml"  \
      --cache 66560  \
      --history.transactions=0 \
      --syncmode=full \
      --tries-verify-mode=local \
      --pruneancient \
      --db.engine=pebble \
      --state.scheme=path \
      --ws \
        --ws.addr 0.0.0.0 \
        --ws.api net,web3,eth,txpool \
        --ws.origins '*' \
      --http \
        --http.addr 0.0.0.0 \
        --http.api net,web3,eth,txpool \
        --http.corsdomain '*' \
        --http.vhosts '*' \
      --maxpeers 64 \
      --nat extip:$(curl -sL ip.anon.global) \
      --log.format=json
      --metrics \
        --metrics.expensive \
        --metrics.influxdbv2 \
        --metrics.influxdb.endpoint "http://127.0.0.1:8086" \
        --metrics.influxdb.token "**********************************************" \
        --metrics.influxdb.organization "Binance" \
        --metrics.influxdb.bucket "bsc" \
        --metrics.influxdb.tags "host=bsc"

⁠Defaults

ParameterValueDescription
userdockeruser docker
uid1000user id 1000
gid1000group id 1000
home/gethhome directory of user docker
enginepebbleGo supported storage backend
apihttp://${IP}:8545HTTP endpoint
apihttp://${IP}:8546WS endpoint

⁠Environment

ParameterValueDefault
TZTime Zone⁠null

⁠Parent image

⁠Built with (thanks to)

⁠Tips

  • Only use rootless container runtime (podman, rootless docker)
  • Don't bind to ports < 1024 (requires root), use NAT/reverse proxy (haproxy, traefik, nginx)
  • Increase cache1 as much as you can (64GB+ recommended)
  • Don't kill container, stop gracefully with enough time to sync RAM to disk

⁠Disclaimers

  • 1 There is currently a bug in pebble that you can’t set more than 4GB RAM on an amd64 system. Cache is currently disabled in the active branch.

Tag summary

Content type

Image

Digest

sha256:3ea8bd7bf…

Size

102.3 MB

Last updated

almost 3 years ago

docker pull 11notes/bsc:1.3.7