Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Support Channel-Specific Chaincode Directories to Prevent Duplicate Docker Mounts #457

Closed
wants to merge 1 commit into from

Conversation

SkySingh04
Copy link
Contributor

Fix: updated fablo.sh to support channel-name/chaincode-name directory structure for Docker mounts

  • Modify executeOnFabloDocker function to dynamically create Docker volume mounts for each chaincode based on the channel-name/chaincode-name directory structure.
  • This change resolves the issue of duplicate Docker mount errors when multiple chaincodes are defined for the same network.

Fixes: #346 #228

… structure for Docker mounts

Signed-off-by: Akash Singh <[email protected]>
@SkySingh04
Copy link
Contributor Author

@dzikowski Kindly review the PR

@dzikowski
Copy link
Contributor

The proposed solution does not solve the issue. The actual error is not about mounting additional volumes for Fablo container. It is about mounting names in Docker Compose file for Fabric CLI container. Have a look at this Docker Compose template: https://github.com/hyperledger-labs/fablo/blob/main/src/setup-docker/templates/fabric-docker/docker-compose.yaml#L102

      <%_ chaincodes.forEach(function(chaincode) { _%>
      - "$CHAINCODES_BASE_DIR/<%= chaincode.directory %>/:/var/hyperledger/cli/<%= chaincode.name %>/"

Instead of target directory pattern /var/hyperledger/cli/<chaincode-name>, we want to have /var/hyperledger/cli/<channel-name>-<chaincode-name>, or /var/hyperledger/cli/<channel-name>/<chaincode-name>.

Then we need to ensure everything works - probably enough is running locally e2e-network/docker scripts.

@SkySingh04 SkySingh04 closed this Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installing the same chaincode on two channels
2 participants