shell命令启动和停止fabric
shell脚本
shell文档:https://www.runoob.com/linux/linux-shell-variable.html
fabric网络搭建执行顺序
1.下载镜像
2.手动:拷贝bin目录下的可执行文件到gopath/bin/
3.手动:拷贝crypto-config.yaml到shell脚本同级目录
4.生成证书,结果生成crypto-config路径
5.手动:拷贝configtx.yaml到shell脚本同级目录
6.生成创世块和通道文件,要求生成文件到channel-artifacts目录
7.手动:拷贝docker-compose-cli.yaml到shell脚本同级目录
8.手动:拷贝链码,chaincode/go/
9.启动docker-compose启动peer,orderer,cli等容器
10.进入cli容器
11.创建通道
12.把当前peer节点加入通道
13.安装链码
14.实例化链码
15.调用,客户端调用,sdk(go-sdk)
写shell脚本
1.start.sh
2.stop.sh
查询启动的容器:docker ps -a
停止容器:docker stop 前面查询到的容器id
删除容器:docker rm 前面查询到的容器id
查询镜像:docker images
删除镜像:docker rmi dev-开头的镜像id
浙公网安备 33010602011771号