Docker Community Forums

Share and learn in the Docker community.

How to dockerize centos server?

Hello i am new with docker can any one help me and advice is it possible to dockerize all centos VM to start it on other server?
The problem is that i need to delete server because some files are corrupted.

Docker is sometimes refered to as “application virtualization”. Though, application virtualization
is a whole different thing than server virtualisation. While the first packages a service, its dependencies, configurations and entrypoint script to controll startup behavior, the later emulates a computer system.

As your scenario requires somethig that emulates a computer system, I highly doubt docker is the right fit.

Good luck with fixing your vm!

ok but would it be a solution to create docker image with same php, apache, mysql? then push all files from apache and mysql db?

Your first question: yes
Your 2nd question: this data, of course should not be part of a docker image, but should be copied over to a network share or local disk and mounted into the container. Just make sure to keep an untouched copy in case something goes wrong.