This project sets up an Avalanche node and CLI environment using Docker Compose. The setup includes:
- Avalanche Node: Runs a full Avalanche node.
- Avalanche CLI: Provides tools for managing subnets and blockchains.
- Docker
- Docker Compose
git clone https://github.com/MatthieuLvsr/docker-avalanche-cli.git
cd docker-avalanche-cli
To start the Avalanche Node and CLI:
docker-compose up --build -d
config/
: Contains configuration files for the Avalanche Node.data/
: Stores the blockchain data.cli-data/
: Persistent storage for Avalanche CLI.
- Provides the core functionality for running an Avalanche blockchain node.
- Accessible at:
- Port 9650: API
- Port 9651: Peering
- Used to create and manage subnets, blockchains, and validators.
- Access via:
docker exec -it avalanche-cli /bin/bash
To check the status of the Avalanche node:
curl -X POST --data '{"jsonrpc":"2.0","method":"info.isBootstrapped","params":{"chain":"C"},"id":1}' -H 'content-type:application/json;' http://localhost:9650/ext/info
To open a bash shell in the CLI container:
docker exec -it avalanche-cli /bin/bash
To create a new subnet:
avalanche subnet create my-subnet
To deploy a subnet on the Fuji testnet:
avalanche subnet deploy my-subnet --fuji
To stop all services:
docker-compose down
- Start all services:
make up
- Access Avalanche CLI:
make cli
- Check the node status:
make status
- Create and deploy a subnet:
make create-subnet
make deploy-subnet
- Stop all services:
make down