Using MySQL server via container is a lot simpler and easier to use than the original route; all we need to do is just pull the appropriate image which contains MySQL installed and connect to it.
In a previous article, we have spoken in length about what a docker compose is, and how it can help us in creating customized image builds. let's talk about how we can also further specify how the images when containerized should behave when struck with a termination, aka their "restart" behavior expectations.
a docker-compose is a command which comes out of the box along with the docker installation, that helps in keeping instructions to run a container out of an image simple without missing out on any instruction which needs to be passed on while creating a container.
A Dockerfile is a configuration file which describes the docker runtime on how to build a customized image from an existing base image and how to get things started. It is useful in building exportable containers for applications which can later be used in creating and deploying containerized nodes.