问题
What is the difference between host based linux containers and image based linux containers?
What are the advantages/disadvantages of each?
How to make decision on which type to use for which scenario?
EDIT
We are investigating virsh
and docker
for usage in one of our products.
Our software runs on RHEL7 which we trying to 'containerize'.
So trying to see what advantage and flexibility each one has before arriving at a decision.
Basically under what scenario we should prefer a host based container created using virsh
and and what scenarios suit docker
.
回答1:
virsh, from the description, is a VM management tool. When you say "host based container" I believe you're referring to Virtual Machine. In comparison with Docker, it all comes down to VM vs container, which there are already plenty fun discussions around it:
How is Docker.io different from a normal virtual machine?
Virtual Machines Vs. Containers: A Matter Of Scope
Docker vs. VMs? Combining Both for Cloud Portability
I would lean toward Docker, container-based solution. As it is leaner, more portable, and is a standardization tool across dev, test, and ops. The technology is young, but is adapting fast in the industry. When you see Google is backing it with container management tool Kubernetes and the future of Google Cloud in containers, you know this technology is heading in the right direction.
Edit: after reading a bit more on virsh, Virsh primarily uses libvirt and LXC, whereas Docker built its own execution environment libcontainer. This approach gives Docker more flexibility to provide features not available on traditional container technology. Read more about it here.
(source: infoq.com)
来源:https://stackoverflow.com/questions/26655050/host-based-containers-vs-image-based-containers