Tinkaal Gogoi
Tinkaal Gogoi

Reputation: 4898

Does containers depends on to a specific host?

I have an application which have kernel space code and it is compiled in linux kernel 2.6.32-431.el6.x86_64 (centos 6.5). Then it is installed as kernel module to run the application. When I tried to containerized my application with Docker (which is installed in Amazon Linux AWS EC2 instance), it complains about the higher kernel version is incompatible with the module. Is it I have to install Docker in a host which have kernel version as 2.6.32-431.el6.x86_64? If yes, does our containers depend on to a specific host machine?

Upvotes: 0

Views: 124

Answers (1)

NetworkMeister
NetworkMeister

Reputation: 1652

Containers include the application and all of its dependencies, but share the kernel with other containers. They run as an isolated process in userspace on the host operating system.

https://www.docker.com/what-docker

Docker containers use host's kernel. You may install the same version of the kernel required in the container as host's kernel, but you will not be able to run CentOS6 compiled kernel on Amazon Linux.

Considering your specific application requirements, I would suggest using "real" virtualization solution such as XEN or KVM that allows you to use your own kernel in a VM.

Upvotes: 1

Related Questions