当前位置: 代码迷 >> 综合 >> filecoin lotus docker 搭建教程(3)
  详细解决方案

filecoin lotus docker 搭建教程(3)

热度:93   发布时间:2023-12-05 18:48:29.0

第一个服务lotus

docker-compose文件

version: "3"services:lotus:container_name: lotusimage: zayn1314/lotus:v1.13.0-rc2-calibnetrestart: alwaysvolumes:- ./config:/root/.lotusnetwork_mode: hosttty: trueenvironment:TZ: Asia/ShanghaiRUSTFLAGS: -C target-cpu=native -gFFI_BUILD_FROM_SOURCE: 1CGO_CFLAGS_ALLOW: -D__BLST_PORTABLE__CGO_CFLAGS: -D__BLST_PORTABLE__IPFS_GATEWAY: https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/GOPROXY: https://goproxy.cncommand: lotus daemon

#第一次启动lotus需要的操作

节点服务起来后,需要修改lotus的config.toml文件(位置在映射出来的config里面)
把IP改成0.0.0.0,以便lotus-miner机器跨主机访问

[API]ListenAddress = "/ip4/0.0.0.0/tcp/1234/http"

重启服务

#以下两条命令选择任意一个都可以,
lotus daemon stop
docker restart lotus

服务查看状态

#docker 查看容器日志
docker logs -f --tail=10 lotus#docker-compose 查看容器日志
docker-compose logs -f --tail=10#lotus 查看服务状态(需要添加宿主机环境变量,详情看docker环境文档)
lotus sync status
lotus sync wait
  相关解决方案