Fabric docker compose檔案-ca
前提
cryptogen生成的檔案放置在./crypto-config內。
compose配置檔案:
docker-compose-ca-orgY.yaml
version: '2'
services:
#容器名稱
#變數
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca-orgY
# docker啟動後啟動一個ca server ,注意修改根證書CA_PRIVATE_KEY和admin密碼
#CA_PRIVATE_KEY: ./crypto-config/peerOrganizations/
#admin密碼:隨意設定
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.orgY.example.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/CA_PRIVATE_KEY
- FABRIC_CA_SERVER_TLS_ENABLED=true
- FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.
- FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/CA_PRIVATE_KEY
#掛載
volumes:
ports:
- "7054:7054"