I think you misunderstood what docker is doing (or I misunderstand your question). Docker is not a virtual machine provider; it is a container management mechanism based on libcontainer. In your case, I would do something like
- yum list is set
- upload a basic docker image for centos X (or you can create one from scratch).
- pass a subset of this output to a docker file with yum installed
- create your image
- If configurations / non-RPM installations are installed in your existing virtual machine, either rebuild them in the container, or in the worst case, share these
- your MySQL is easier to manage; as long as the database folder / partition can be copied and distributed using dockers, you can install mysql and use this. We did this with postgres several times and hoping mysql would be just as clean.
The best part is that when you complete this exercise, you have a script that tells you how you created your image.
source share