<p>So the title it pretty self-explanatory. Lets say I have three containerized dotnet apps and I don't wanna have dotnet runtime inside each container and neither do I wanna install dotnet runtime on host machine. <strong>How do I share dotnet runtime  between the containers in a single pod, then?</strong></p>
<p>Sorry if it's duplicate or stupid question, I'm newbie in both docker and kubernetes.</p>

ekvalizer
<p>In short, you don't need to worry about &quot;duplicating&quot; the dotnet runtime inside each container. The issue you are concerned about is a key feature of containerization, but it takes a little research to understand.</p>
<p>Here is a brief overview of how Docker builds and stores images, and how these images are used by containers.</p>
<ul>
<li>Each image is composed of several &quot;layers.&quot;</li>
<li>Each layer is overlaid atop the previous layer, only containing the differences from the layer before it.</li>
<li>At the very top is a thin, writable container layer.</li>
</ul>
<p>Because each container has its own writable container layer, and all runtime changes are stored in this container layer, multiple containers can share access to the same underlying image and yet have their own data state. Using your example, if several dotnet containers are running on the same Kubernetes node, they will share any identical read-only image layers, but each container will have a separate read/write container layer.</p>
<p>This reference discusses the topic in further detail: <a href="https://docs.docker.com/storage/storagedriver/" rel="nofollow noreferrer">https://docs.docker.com/storage/storagedriver/</a></p>
