Can i dockerize a script?

Hi experts

I have a redhat machine that certain users use to execute a script. The thing is I originally wanted to put the redhat machine on VM, but the performance of the script is too slow. We are noticing a 27X increase with VM for execution time. meaning what used to take 10 seconds now takes 270 seconds. While there are definitely things we are going to investigate with the VM I came across docker as an alternative.

It seems to promise the same easy of deployment, and easy of backup and restore as virtualization, but with significantly better performance.

So my question is: can docker help me with my problem?

From my experience I can tell you that it certainly can. I use docker containers as lightweight VMs, but I have installed Ubuntu on them (not CentOS).

so how would I go about doing that? I guess I would have to setup docker engine on the redhat baremetal, then the image on a docker host? Here is the thing, I don’t have control of the script, so would I have to dockerize a whole OS? I am a bit confused on that part.

Look at the scripts here: github.com/dashohoxha/bind9
Maybe they can help you to understand how to go about it.