I used command "docker pull mysql:5.7.28" which showed image and container correctly in docker desktop but when trying to run the container it showed exited and error was MYSQL_ROOT_PASSWORD required.
So I need to edit MYSQL_ROOT_PASSWORD in yaml file to resolve this issue. Now the problem is simple I have not used docker-compose file to setup the container and unable to find option in docker desktop to set up this variable.