The reason for persisting the data is that every time i run the ganache-cli container , the deployed smart contracts address changes each time i restart it .SO i am looking for a work around to either persist the data so that contract address wont change on frequent restart or else automatically deploy the contract and get the contract address out of it. For time being i have used the below statement to run ganache :
sudo docker run -d --name ganache --network=test1 --ip=172.28.5.2 -p 8545:8545 trufflesuite/ganache-cli:latest -i 2100 --db=path/to/ganache/data
however the data is not saved in ganache directory.let me know if you need any more clues.Thanks in advance!