Gravity私链搭建指南(windows) - SHDMT/gravity GitHub Wiki
1.下载并安装docker
https://docs.docker.com/docker-for-windows/install/
2.下载代码
git clone https://github.com/SHDMT/gravity.git
cd gravity
git checkout release-0.1
3.启动docker节点
3.1. 获取镜像
docker pull shdmt/gravity //获取镜像
docker images //确认
3.2. 启动镜像
cd docker/docker-compose
docker-compose up -d //启动
docker ps //确认
4.开启容器(g1-g7)的挖矿
docker exec g1 bash -c "gravity-cli startmining -t 1"
docker exec g2 bash -c "gravity-cli startmining -t 1"
docker exec g3 bash -c "gravity-cli startmining -t 1"
docker exec g4 bash -c "gravity-cli startmining -t 1"
docker exec g5 bash -c "gravity-cli startmining -t 1"
docker exec g6 bash -c "gravity-cli startmining -t 1"
docker exec g7 bash -c "gravity-cli startmining -t 1"
5.进入任意节点查看日志
docker exec -it g1 bash //进入容器g1
logmonitor.sh //查看日志
6.启动命令行,确认能够ping通节点,如果ping不通,需要设置宿主机到镜像的路由(需要管理员权限)
#ping 172.28.1.111
route add 172.0.0.0 mask 255.0.0.0 10.0.75.2
7.安装钱包
7.1 配置本地config.yaml
7.3.1. 在C:\Users\用户名\AppData\Local\目录下建立gravity文件夹
7.3.2. 把gravity项目的config.yaml文件copy到gravity文件夹下
7.3.3. 修改config.yaml文件里的localIP,把127.0.0.1修改成本地内网的IP地址
LocalIp: '127.0.0.1'
7.2 安装钱包
参考https://github.com/SHDMT/gwallet-GUI/wiki/%E9%92%B1%E5%8C%85GUI%E7%BC%96%E8%AF%91%E6%8C%87%E5%8D%97
0.备注:
0.1 恢复有钱钱包的助记词
cowbell handiwork tempest puberty absurd maverick soybean recipe repay pedigree snapshot Montana offload monument flytrap combustion kickoff autopsy choking fascinate assume paragon buzzard gossamer preclude getaway offload Pandora drunken document crucial Babylon woodlark
0.2 删除容器
cd gravity/docker/docker-compose
docker-compose stop
docker-compose rm -f