Reputation: 139
Currently, whenever any of the core Hyperledger Fabric containers (Peer, Orderer) are deployed, they run with root privileges.
I already found that instantiation of chaincode requires root privileges and this problem has not been addressed yet: https://jira.hyperledger.org/browse/FAB-9394?jql=text%20~%20%22non-root%22
I also tried to run HLF containers with non-root user by setting the "user" environmental variable in docker-compose and point it to the UID/GID of the host user. This obviously resulted with a failure.
Has anyone managed to successfully deploy Hyperledger Fabric with non-root privileges?
Upvotes: 0
Views: 401
Reputation: 12053
By default, both peers and orderers store / write their ledger files to /var/hyperledger/production
. In general, you should be mounting an external volume using that as the mount point. If you are running as a non-root user, you'll need to make sure that user has permissions on the host directory you are mounting.
Upvotes: 1