For local builds
Please see https://github.com/blockscout/blockscout/tree/master/docker-compose for all required information.
- Docker v20.10+
- Docker-compose 2.x.x+
- Running Ethereum JSON RPC client
docker-compose up --build
This command uses by-default
docker-compose.yml, which builds the explorer into the Docker image and runs 6 Docker containers:
- Postgres 14.x database, which will be available at port 7432 on localhost.
- Redis database of latest version, which will be available at port 6379 on localhost.
- Blockscout explorer at http://localhost:4000.
and 3 Rust microservices:
The repo above contains built-in configs for different clients without needing to build the image.
Note for Linux users: Linux users who run Blockscout in docker with a local node need to run the node on http://0.0.0.0/ rather than http://127.0.0.1/
docker-compose -f docker-compose-no-build-erigon.yml up -d
docker-compose -f docker-compose-no-build-geth.yml up -d
- Nethermind, OpenEthereum:
docker-compose -f docker-compose-no-build-nethermind up -d
docker-compose -f docker-compose-no-build-ganache.yml up -d
- HardHat network:
docker-compose -f docker-compose-no-build-hardhat-network.yml up -d
- Running only explorer without DB:
docker-compose -f docker-compose-no-build-no-db-container.yml up -d. In this case, one container is created - for the explorer itself. And it assumes that the DB credentials are provided through
In order to stop launched containers, run
docker-compose -d -f config_file.yml down, replacing
config_file.ymlwith the file name of the config which was previously launched.
You can adjust BlockScout environment variables from
./envs/common-blockscout.env. Descriptions of the ENVs are available in the docs.