I am trying to instantiate the chaincode using
peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n skynetchaincode -v v1 -c '{"Args":[""]}'
but geeting the following error.
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Post http://unix.sock/containers/create?name=dev-peer0.org1.example.com-skynetchaincode-v1: dial unix
/host/var/run/docker.sock: connect: permission denied
Solutions I tried.
1 Added to peer and cli env
- USERNAME=$USER
- USER_ID=1000
- GROUP_ID=999
- CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
2. chmod 777 /var/run/docker.sock
srwxrwxrwx. 1 root root 0 Aug 12 18:02 /var/run/docker.sock
3. sudo usermod -aG docker $USER
4. sudo systemctl restart docker
that is supposed to create a separate running docker container with installed chaincode in that but its showing access denied error
dev-peer0.org1.example.com-skynetchaincode-v1
fabric version 1.4
docker Client:
Version: 1.13.1
API version: 1.26
Package version: docker-1.13.1-96.gitb2f74b2.el7.x86_64
Go version: go1.10.8 ```