我正在使用 docker-compose 来运行 Fabric ca,如下所示。我想使用更新的fabric-ca-server.config 文件启动fabric ca。我有fabric-ca-server-config,我已经修改了它,我想在运行docker时初始化。请推荐我。
ca0:
image: hyperledger/fabric-ca
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca.example.com
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/_sk
ports:
- "7054:7054"
command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/_SK-b admin:adminpw -d'
volumes:
- ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config
container_name: ca_peerOrg1
networks:
- byfn
最佳答案
@fama,
您可以将配置文件路径传递给以下命令
fabric-ca-server start -b admin:adminpw --cafiles /ca/ca1/fabric-ca-server-config.yaml
挂载文件路径如下
volumes:
- ./ca/fabric-ca-server-config.yaml: /ca/ca1/fabric-ca-server-config.yaml
关于docker - 使用修改后的fabric-server-config初始化fabric ca,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58595490/