Containers, Security, and Double Dipping
If you're implementing containers, make sure their kernels are kept wide apart.
Join the DZone community and get the full member experience.Join For Free
one of the common misconception about containers is that they act as light vms. which would make you think they are perfectly isolated. it's not true. while they all give you some level of isolation, they all share a common kernel. and that is the main idea actually. containers are lightweight because you don't have to emulate the whole thing, because they share a common kernel.
running your containers in production on some cloud provider might put you in a situation where your container will share a kernel with some unknown container. does this make you uncomfortable?
the double dipping analogy
pretend you are at a party. and you are sharing a dip with someone. and that someone double dips. do you keep sharing? if that someone is your significant other and you are of a trusting nature you will probably continue. if you absolutely don't know that person, you are a lot less likely to continue. and then let's say some people are adventurous, or maybe you are bear grylls. and by the way you'll find answers to all your double dip questions on this article .
putting containers in production on a cloud is a little similar. if you have your own machine and you know all the containers sharing the same kernel, and you are of a trusting nature, you will probably continue. if you absolutely don't know the other containers sharing that kernel, you are less likely to continue. and then some people don't care and just like to watch the world burn.
we all have our own trust level. some people will never run two containers on one kernel because you never know what could happen. others will be ok to share a kernel as long as they know all the other sharing parties. and some won't care about it and have their containers share a kernel with perfect strangers.
containers are great, just make sure you know what you are getting into. and if you want to run couchbase in a docker container, you should check out our documentation .
Published at DZone with permission of Laurent Doguin, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.