Custom MySQL Docker Instance

Hi folks, have you ever been in a situation where you were required to set up or mimic the current MySQL instance of any environment? Well recently, I have been in such a situation, and my use case was to test the overall services, so I decided to use Minikube for service deployment as a whole. Now, when I had to deploy a MySQL instance, it was quite a tedious task to run a normal MySQL container and then source the DB script for the database every time a new container comes up.

Sometimes it was quite annoying because the dump takes 10-15 minutes to get populated. Another issue was that if you think that you can dump the file in a running container and the Docker commit will do the trick, it won't!