Docker Community Forums

Share and learn in the Docker community.

Hyperledger Fabric peer container being replaced

swarm

(Blockmcchainy) #1

I have a Hyperledger Fabric network running with Docker swarm. I’ve tried to test the stability of the network by taking a peer down and up again to see it the network still functions. With ‘regular’ docker this works. I can invoke and query the peer after it has been down.

With docker swarm this doesn’t work. When I update a peer service, docker replaces the container with a new one. This new peer container has access to ledger files but nothing is installed on it. I can join it to the network and install chaincode on it. But when I invoke or query this peer I get an error. This seems logical because the former peer was already a part of the ledger and even though it’s gone, its configuration is still there.

Is there a way to add the old peer container back to the service? Or create a new service using existing containers?