When running the sandbox in a container I can not access its ledger-api from the host machine
- DarkoOP 1
I am aware that I need to set the
ledger-apiaddress to0.0.0.0for the API to be accessible from the host machine as specified here Installing Canton — Daml SDK 2.3.2 documentationHowever, I was not able to do so so far.
I tried running:
- daml sandbox --dar [path/to.dar] -C address=0.0.0.0and
- daml sandbox --dar [path/to.dar] -C ledger-api.address=0.0.0.0but it didn’t work. I am assuming that I need to do something like this?
daml sandbox --dar [path/to.dar] -C [participantName].ledger-api.address=0.0.0.0If the documentation for this doesn’t exist, I think it would be useful to create it as I believe this could be a fairly common use case.
- cocreature 2
The crucial sentence here is in the sandbox docs:
Behind the scenes, Sandbox spins up a Canton ledger with an in-memory participant
sandboxand an in-memory domainlocal.So your example should be
-C canton.participants.sandbox.ledger-api.address=0.0.0.0 - Darko
thanks!
I actually tried using
sandbox.ledger-api.address
but I missed the full path ofcanton.participants.[...]
However, I think that this use case could be common enough for an explicit explanation in the docs.
- Ianw1 1
FWIW for future readers looking to get this working, I describe the steps I took in this blog, albeit I created a new Docker image with the required setting.