yeasy/docker-compose-files

how to add user to memebersrc

yqbjtu opened this issue · 5 comments

When I used - CORE_SECURITY_ENROLLID=test_vp0
- CORE_SECURITY_ENROLLSECRET=MwYpmSRjupbT

"peer network login test_vp0 -p MwYpmSRjupbT" operation failed after login to docker bash

From https://github.com/hyperledger/fabric/blob/master/membersrvc/membersrvc.yaml, I saw, there are built-in users. How can I add username/password when I start according to this https://github.com/yeasy/docker-compose-files/tree/master/hyperledger

yeasy commented

Currently, you can modified the docker-compose.yml file, and map your own membersrvc.yaml into the nodes.

Thank you!

I changed docker-compose-with-membersrvc.yml file by the following way:
membersrvc:
image: yeasy/hyperledger-membersrvc:latest
restart: unless-stopped
expose:
- "7054"
volumes: # docker.sock is mapped as the default CORE_VM_ENDPOINT
- /var/run/docker.sock:/var/run/docker.sock
- ./membersrvc.yaml:/go/bin/membersrvc.yaml

the membersrvc.yaml is from https://github.com/hyperledger/fabric/blob/master/membersrvc/membersrvc.yaml and I added some user/pw.

when starting by compose, it can 't get login with new added users.

Do you mean that I should create a new image like yeasy/hyperledger-membersrvc:latest, the new image's Dockerfile is like this https://github.com/hyperledger/fabric/blob/master/membersrvc/Dockerfile,but I replace membersrvc.yaml files. such as if the new images is named as user1/hyperledger-membersrvc:customerized. then change the docker-compose-with-membersrvc.yml from "image: yeasy/hyperledger-membersrvc:latest" to "user1/hyperledger-membersrvc:customerized"

Thank you in advance!

yeasy commented

The membersrvc.yaml path is incorrect.
It should be $GOPATH/src/github.com/hyperledger/fabric/membersrvc/membersrvc.yaml.

A possible easier way is to update that file insides the container, and submit as a new image.

@yqbjtu: Were you able to add an user ? If yes could you guide me on that

yeasy commented

The membersrvc is migrating to fabric-ca project, FYI.

github.com/hyperledger/fabric-ca