Search code examples
dockerdocker-composehyperledger-fabricdocker-imagehyperledger-fabric-ca

Having Trouble Downloading Hyperledger fabric docker images


Background: I just downloaded docker, docker-compose, node.js,npm, and the hyperledger samples from the offical documentation. However, when I downloaded the hyperledger sample networks,everything seemed to be going fine until the script tried pulling the Hyperledger fabric docker images. This is the error message:

===> Pulling fabric Images

====> hyperledger/fabric-peer:2.1.0

Got permission denied while trying to connect to the Docker daemon socket at unix:///var
/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/images
/create?fromImage=hyperledger%2Ffabric-peer&tag=2.1.0: dial unix /var/run/docker.sock: 
connect: permission denied

NOTE: I am using ubuntu 18.04.4


Solution

  • I'm guessing: either the Docker service is not running, or your user does not have permission to access the Docker service (more likely).

    Running your command as sudo is one way to fix it. Or have a look at this question: How can I use docker without sudo? (but be careful about the security trade-offs!)