Thanks a lot. I also found out that dfx used in the build is 0.12 while the latest is 0.20. When changing that to the latest, it solved the problem.
It didn’t reflect my code changes though, so when i delved into the scripts, it seems it is using ic containers from docker.io.
I tried using build-image.sh and it built a container in docker. Not sure if it is building through the local source code though and not sure whether container-run.sh is actually running this local container after removing docker.io form IMAGE!
If there is a complete guide to building and running ic locally, would be highly appreciating.