Docker and OpenVZ are similar in that they both create isolated environments for running applications. However, they do so in different ways, and are not fully compatible with each other.
Docker images rely on certain features of the Linux kernel (namespaces and cgroups) which are shared with the host system. OpenVZ uses a customized kernel and a separate set of tools to manage its containers, which doesn’t include full support for these Docker features.
Therefore, you won’t be able to run Docker images directly inside an OpenVZ container. If you wish to use Docker, you would need to install it on the host system or consider virtualizing at a different layer with a technology such as KVM or Xen.
Alternatively, you could consider using OpenVZ’s container format for your application. Additionally, Virtuozzo (the company behind OpenVZ) has their own container product called Virtuozzo Containers which can run Docker images.
In conclusion, while you cannot directly use Docker images inside OpenVZ containers due to kernel compatibility issues, there are alternatives like using Docker on the host system or utilizing Virtuozzo Containers to run Docker images.