How to use properly centos dockerfile with ubuntu

2019-06-27 20:51发布

问题:

I would like to know if it is dangerous or dumb to use a centos image with an ubuntu host. I understand the main concepts with Docker (lxc, aufs...) but if we start a centos container is it a real centos ? the kernel is this from ubuntu. How to deal with it ?

Sorry if my question is bad explained.

Thanks a lot. Best regards Nicolas

回答1:

It would be the same as to use Centos with a Ubuntu kernel. Most of things would work, but you could have some side effects(e.g. selinux may stop working because ubuntu supports appamor instead).