hyperledger-firefly / hyperledger-firefly/cli

CLI attempts to pull "local" Docker images (and fails)

Open
#119 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
66
Forks
64
PR merge metrics
No merged PRs in 30d

Description

If you point the CLI to a local manifest with `-m manifest.json`, and that manifest contains a local Docker definitions such as:
```
"tokens-erc1155": {
"image": "ghcr.io/hyperledger/firefly-tokens-erc1155",
"local": true
}
```

When running `ff start`, the CLI still pulls the latest image from the server, overwriting the local image.

This seems to be due to a duplication in the `PullStack` method [here](https://github.com/hyperledger/firefly-cli/blob/a80fccc699b98b2ca3372b656215437758c9b9b6/internal/stacks/stack_manager.go#L397). It first iterates the images defined in the manifest, and does properly skip those tagged as local. But then it goes on to pull the latest for all images defined by the blockchain and token plugins, defeating the purpose of the earlier loop.

Side node: because it first pulls all the images defined in the manifest, it will pull images even if you're ultimately not using them (ie it pulls fabconnect even if your blockchain provider is Ethereum).

Conclusion from all this: we need better "pull" logic to intersect the info from these two places - it should only pull the Dockers actually used in the stack, but it should also honor the versions and "local" flag defined for those images in the manifest.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.