Can you tell me what is the difference between Docker and OpenVZ? Which one is better on Linux system?
@24x7CSM is totally right, there is no reason to compare OpenVZ and Docker because their features and possible usages are not the same.
OpenVZ is a container virtualization solution, similar to LXC/LXD, which provide the ability to host several isolated containers running a full linux distribution on the same host.
Main usage : providing virtual servers hosting on dedicated servers with isolated containers
When
Docker is a lightweight container virtualization solution built "to
develop, deploy, and run applications with containers" like Docker.com explain it in its documentation. Docker cannot be used (isn't intended) to run a full linux distribution in a container, but only a single application.
Main usage : running applications inside containers on almost all platform to isolate each service inside a container (most of time, Docker containers are running inside virtual machines powered by KVM, XEN, or VMWARE)