我正在使用docker-compose来运行fabric ca,如下所示。我想使用更新的fabric-ca-server.config文件启动Fabricca。我有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