How to run Iron Fish node with docker
2022-05-13 16:24
SACTE Labs
2022-05-13 16:24
SACTE Labs
2022-05-13 16:24
订阅此专栏
收藏此文章

Precondition

Install docker and docker compose

wget -qO- <https://get.docker.com/> | bash
curl -L "<https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$>(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

Installation procedure

Here is the compose yaml template. You can custom <your storage>.

version: '3.3'
services:
iron-fish:
container_name: iron
network_mode: host
restart: unless-stopped
volumes:
- '<your storage>:/root/.ironfish'
image: 'ghcr.io/iron-fish/ironfish:latest'
miners:
container_name: iron-miner
image: ghcr.io/iron-fish/ironfish:latest
network_mode: host
volumes:
- '<your storage>:/root/.ironfish'
restart: unless-stopped
command: miners:start -t 10
  1. You need set blockGraffiti for your Iron Fish node
docker run -d --name iron --rm --tty --interactive --network host --volume <your storage>:/root/.ironfish ghcr.io/iron-fish/ironfish:latest
docker run --rm --tty --interactive --network host --volume <your storage>:/root/.ironfish ghcr.io/iron-fish/ironfish:latest config:set blockGraffiti "SACTE"
docker stop iron && docker rm iron
  1. Then you can up your node with docker compose
docker-compose -f iron.yml up -d

Upgrade

If you want to upgrade your node version. You can do this.

docker pull [ghcr.io/iron-fish/ironfish:latest](<http://ghcr.io/iron-fish/ironfish:latest>)
docker-compose -f iron.yml down
docker-compose -f iron.yml up -d

If the upgrade need reset. You can do this.

docker pull ghcr.io/iron-fish/ironfish:latest docker exec iron-miner /usr/src/app/bin/ironfish accounts:export default > iron.default.json docker-compose -f iron.yml down docker-compose -f iron.yml up -d docker-compose -f iron.yml stop iron-fish echo "Y" | docker exec -i iron-miner /usr/src/app/bin/ironfish reset echo $(cat iron.default.json) | docker exec -i iron-miner /usr/src/app/bin/ironfish accounts:import docker-compose -f iron.yml restart

About SACTE

A unique and irreplaceable institution dedicated to the emerging frontier of crypto

Website | Twitter | MediumMirror

【免责声明】市场有风险,投资需谨慎。本文不构成投资建议,用户应考虑本文中的任何意见、观点或结论是否符合其特定状况。据此投资,责任自负。

SACTE Labs
数据请求中
查看更多

推荐专栏

数据请求中
在 App 打开