Closed prachi2703 closed 3 years ago
Hi prachi2703; you need to tell immuclient which is immudb address in order to connect to it. You can do it in two ways:
In the first way you ask docker for the IP of the immudb server and use it this "dynamic" ip on the client:
docker run -it --rm --name immudbserver -p 3322:3322 codenotary/immudb:latest
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' immudbserver
docker run -it --rm --name immuclient codenotary/immuclient:latest -a address.that.is.the.result.of.last.command
Other way, you can assign a "static" IP address to the server and use it in the client:
docker network create --subnet=172.18.0.0/16 mynet123
docker run --net mynet123 --ip 172.18.0.22 -it --rm --name immudbserver -p 3322:3322 codenotary/immudb:latest
docker run -it --rm --net mynet123 --name immuclient codenotary/immuclient:latest -a 172.18.0.22
Thanks!! That worked.
if you don't want to use ip addresses at all:
docker network create immudbnet
docker run -d --net immudbnet -it --rm --name immudb -p 3322:3322 codenotary/immudb:latest
docker run -it --rm --net immudbnet --name immuclient codenotary/immuclient:latest -a immudb
In the documentation, it has been mentioned that we can find immuclient in the immudb container (/usr/local/bin/immuclient). But there was no such file present other than immuadmin.
If I want to runn immuclient image to connect to the immudb container, do I need to pass/set any environment variables? I am getting the following error while running:
docker run -it --rm --name immuclient codenotary/immuclient:latest -a localhost