I am newbie to the world of virtualization. Can some one explain to me the differences between OpenVZ and Docker?
What could be good for the future?
Pros and cons?
OpenVZ offers container-based virtualization. OpenVZ is an open source software that adds container-based virtualization to Linux. OpenVZ provides an OS-level virtualization technology that lets admins implement multiple Linux containers running in isolation from each other, without the VM overhead.
What is the main difference between OpenVZ and KVM? KVM is a full virtualization solution, and OpenVZ offers OS-level virtualization. As a result, KVM's virtual machines are completely isolated and can support different operating systems, while OpenVZ containers use the host's kernel and can only run on Linux.
OpenVZ (Open Virtuozzo) is an operating-system-level virtualization technology for Linux. It allows a physical server to run multiple isolated operating system instances, called containers, virtual private servers (VPSs), or virtual environments (VEs). OpenVZ is similar to Solaris Containers and LXC.
Virtuozzo is optimized for hosters and offers hypervisor (VMs in addition to containers), distributed cloud storage, dedicated support, management tools, and easy installation.
The perspective on containers is very different between the 2.
In short OpenVZ sees a container as a VPS, and docker sees a container as an application/service.
What does this imply? For OpenVZ you can expect that when you create containers, its sort of like making Virtual Servers. OpenVZ has interfaces focussed on setting up VPS containers that you decorate yourself manually. Therefore they provide templates for empty linux machines that you can start up and shut down, that you afterward SSH into, to set them up yourself with whatever you need, like a LAMP stack.
When you would want to set up a LAMP stack, you would do it like you usually do when you set up a new server. You get an empty linux machine with a virtual ethernet adapter that has its own publicly accessible WAN IP with Ubuntu on it, access it with SSH, and you install all required services in it using your average package manager (yum or apt) and do the setup required in config files yourself.
For Docker, you can expect that when you create containers, the container is a single application, that just does ONE thing. Hence, it might need some other containers to help it. (For example a container that provides a database) Docker made it very easy to define whats inside a container without having to actually start one up, and constantly create new exactly equals instances of this container. They define the contents of a docker container (the image) by using very lightweight templates that they call Dockerfiles.
There is a huge set of dockerfiles already out there, that you can find in the Docker hub, take a look yourself (its like being in a candy shop with free candy! :D): docker hub. The images produced by these dockerfiles can be pulled with the docker CLI tool, by using a pull command. In docker theres also easy access to stuff like port forwarding, virtual directories (so that you can acces files on the host machine easily) and things alike that any executable could use.
If you would want a LAMP stack in docker, all you do is "docker run -d -p 80:80 tutum/lamp"
This pulls the image tutum/lamp, and runs daemonised (-d) it with port 80 from the container forwarded to the port 80 of the host, exposing the inner webservice to the outside. As you can see, it does not have its own IP address in contrast to an OpenVZ machine. And its just like its an apache server running on your root machine. The advantage compared to installing it natively, is that docker makes the installation a lot easier and unlimitedly replicable. Also it doesn't clutter your host machine with lots of files, and supplies a security boundary around your application.
Theres lots of features in most docker images, that are unique to it. For the tutum/lamp image, take a look here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With