Quick Start with Docker
Install the prerequisites:
Run
docker-compose
to bring up a network of 4 containerised peers:bash$ docker-compose up
$ docker-compose up
Depending on your set-up, this might either pull the image off of DockerHub, or build the container locally. After this process is complete, you'll be greeted with,
[+] Running 4/0 ⠿ Container iroha-iroha2-1 Created 0.0s ⠿ Container iroha-iroha0-1 Created 0.0s ⠿ Container iroha-iroha3-1 Created 0.0s ⠿ Container iroha-iroha1-1 Created 0.0s Attaching to iroha-iroha0-1, iroha-iroha1-1, iroha-iroha2-1, iroha-iroha3-1 iroha-iroha1-1 | 2023-02-27T12:43:08.540651Z INFO iroha: Hyperledgerいろは2にようこそ! iroha-iroha1-1 | 2023-02-27T12:43:08.542379Z INFO iroha: (translation) Welcome to Hyperledger Iroha 2! iroha-iroha1-1 | 2023-02-27T12:43:08.542906Z INFO iroha: Starting peer listen_addr=iroha1:1338 iroha-iroha1-1 | 2023-02-27T12:43:08.543188Z INFO iroha_p2p::network: Binding listener listen_addr=iroha1:1338 iroha-iroha1-1 | 2023-02-27T12:43:08.551356Z INFO iroha_p2p::network: Starting network actor listen_addr=iroha1:1338 iroha-iroha1-1 | 2023-02-27T12:43:08.569289Z INFO iroha_core::kura: Loaded 0 blocks at init. iroha-iroha1-1 | 2023-02-27T12:43:08.572457Z ERROR iroha: Telemetry did not start iroha-iroha1-1 | 2023-02-27T12:43:08.594190Z INFO iroha: Starting Iroha iroha-iroha2-1 | 2023-02-27T12:43:08.698491Z INFO iroha: Hyperledgerいろは2にようこそ! iroha-iroha2-1 | 2023-02-27T12:43:08.700998Z INFO iroha: (translation) Welcome to Hyperledger Iroha 2! iroha-iroha2-1 | 2023-02-27T12:43:08.701624Z INFO iroha: Starting peer listen_addr=iroha2:1339 iroha-iroha2-1 | 2023-02-27T12:43:08.701895Z INFO iroha_p2p::network: Binding listener listen_addr=iroha2:1339 iroha-iroha2-1 | 2023-02-27T12:43:08.707759Z INFO iroha_p2p::network: Starting network actor listen_addr=iroha2:1339 iroha-iroha0-1 | 2023-02-27T12:43:08.719683Z INFO iroha: Hyperledgerいろは2にようこそ! iroha-iroha0-1 | 2023-02-27T12:43:08.722029Z INFO iroha: (translation) Welcome to Hyperledger Iroha 2! iroha-iroha2-1 | 2023-02-27T12:43:08.730201Z INFO iroha_core::kura: Loaded 1 blocks at init. iroha-iroha2-1 | 2023-02-27T12:43:08.746975Z ERROR iroha: Telemetry did not start iroha-iroha0-1 | 2023-02-27T12:43:08.748879Z INFO iroha: Starting peer listen_addr=iroha0:1337 iroha-iroha0-1 | 2023-02-27T12:43:08.749155Z INFO iroha_p2p::network: Binding listener listen_addr=iroha0:1337 iroha-iroha0-1 | 2023-02-27T12:43:08.754613Z INFO iroha_p2p::network: Starting network actor listen_addr=iroha0:1337 iroha-iroha3-1 | 2023-02-27T12:43:08.753230Z INFO iroha: Hyperledgerいろは2にようこそ! iroha-iroha3-1 | 2023-02-27T12:43:08.754934Z INFO iroha: (translation) Welcome to Hyperledger Iroha 2! iroha-iroha3-1 | 2023-02-27T12:43:08.755503Z INFO iroha: Starting peer listen_addr=iroha3:1340 iroha-iroha3-1 | 2023-02-27T12:43:08.755802Z INFO iroha_p2p::network: Binding listener listen_addr=iroha3:1340 iroha-iroha3-1 | 2023-02-27T12:43:08.760437Z INFO iroha_p2p::network: Starting network actor listen_addr=iroha3:1340 iroha-iroha2-1 | 2023-02-27T12:43:08.763216Z INFO iroha: Starting Iroha
[+] Running 4/0 ⠿ Container iroha-iroha2-1 Created 0.0s ⠿ Container iroha-iroha0-1 Created 0.0s ⠿ Container iroha-iroha3-1 Created 0.0s ⠿ Container iroha-iroha1-1 Created 0.0s Attaching to iroha-iroha0-1, iroha-iroha1-1, iroha-iroha2-1, iroha-iroha3-1 iroha-iroha1-1 | 2023-02-27T12:43:08.540651Z INFO iroha: Hyperledgerいろは2にようこそ! iroha-iroha1-1 | 2023-02-27T12:43:08.542379Z INFO iroha: (translation) Welcome to Hyperledger Iroha 2! iroha-iroha1-1 | 2023-02-27T12:43:08.542906Z INFO iroha: Starting peer listen_addr=iroha1:1338 iroha-iroha1-1 | 2023-02-27T12:43:08.543188Z INFO iroha_p2p::network: Binding listener listen_addr=iroha1:1338 iroha-iroha1-1 | 2023-02-27T12:43:08.551356Z INFO iroha_p2p::network: Starting network actor listen_addr=iroha1:1338 iroha-iroha1-1 | 2023-02-27T12:43:08.569289Z INFO iroha_core::kura: Loaded 0 blocks at init. iroha-iroha1-1 | 2023-02-27T12:43:08.572457Z ERROR iroha: Telemetry did not start iroha-iroha1-1 | 2023-02-27T12:43:08.594190Z INFO iroha: Starting Iroha iroha-iroha2-1 | 2023-02-27T12:43:08.698491Z INFO iroha: Hyperledgerいろは2にようこそ! iroha-iroha2-1 | 2023-02-27T12:43:08.700998Z INFO iroha: (translation) Welcome to Hyperledger Iroha 2! iroha-iroha2-1 | 2023-02-27T12:43:08.701624Z INFO iroha: Starting peer listen_addr=iroha2:1339 iroha-iroha2-1 | 2023-02-27T12:43:08.701895Z INFO iroha_p2p::network: Binding listener listen_addr=iroha2:1339 iroha-iroha2-1 | 2023-02-27T12:43:08.707759Z INFO iroha_p2p::network: Starting network actor listen_addr=iroha2:1339 iroha-iroha0-1 | 2023-02-27T12:43:08.719683Z INFO iroha: Hyperledgerいろは2にようこそ! iroha-iroha0-1 | 2023-02-27T12:43:08.722029Z INFO iroha: (translation) Welcome to Hyperledger Iroha 2! iroha-iroha2-1 | 2023-02-27T12:43:08.730201Z INFO iroha_core::kura: Loaded 1 blocks at init. iroha-iroha2-1 | 2023-02-27T12:43:08.746975Z ERROR iroha: Telemetry did not start iroha-iroha0-1 | 2023-02-27T12:43:08.748879Z INFO iroha: Starting peer listen_addr=iroha0:1337 iroha-iroha0-1 | 2023-02-27T12:43:08.749155Z INFO iroha_p2p::network: Binding listener listen_addr=iroha0:1337 iroha-iroha0-1 | 2023-02-27T12:43:08.754613Z INFO iroha_p2p::network: Starting network actor listen_addr=iroha0:1337 iroha-iroha3-1 | 2023-02-27T12:43:08.753230Z INFO iroha: Hyperledgerいろは2にようこそ! iroha-iroha3-1 | 2023-02-27T12:43:08.754934Z INFO iroha: (translation) Welcome to Hyperledger Iroha 2! iroha-iroha3-1 | 2023-02-27T12:43:08.755503Z INFO iroha: Starting peer listen_addr=iroha3:1340 iroha-iroha3-1 | 2023-02-27T12:43:08.755802Z INFO iroha_p2p::network: Binding listener listen_addr=iroha3:1340 iroha-iroha3-1 | 2023-02-27T12:43:08.760437Z INFO iroha_p2p::network: Starting network actor listen_addr=iroha3:1340 iroha-iroha2-1 | 2023-02-27T12:43:08.763216Z INFO iroha: Starting Iroha
Follow the Bash tutorial to check out Iroha's capabilities.
When you're done with the test network, just hit
Control + C
to stop the containers (⌃ + C
on Mac).
Docker Options
You might also be interested in other options for local compilation:
- For testing Iroha code quickly, you can use
docker-compose-single.yml
, which starts a container with a single peer. - For testing Iroha code in normal conditions, you can use
docker-compose-local.yml
, which starts 4 connected containers with peers.
INFO
Please note that there is ongoing work to make our configurations for Docker even more customizable with the help of Swarm.