<p>While playing around with Docker and orchestration (kubernetes) I had to install and use minikube to create a simple sandbox environment. At the beginning I thought that minikube installs some kind of VM and run the &quot;minified&quot; kubernetes environment inside the same, however, after the installation listing my local Docker running containers I found minikube running as a container!!</p>
<p>Why minikube itself run as a Docker container? and how can it runs other containers?</p>

<p>Experimental Docker support looks to have been <a href="https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md#version-170-beta0---2020-01-15" rel="nofollow noreferrer">added</a> in minikube 1.7.0, and <a href="https://github.com/kubernetes/minikube/blob/master/CHANGELOG.md#version-190-beta1---2020-03-18" rel="nofollow noreferrer">started becoming the default runtime</a> in minikube 1.9.0.  As I'm writing this, current is 1.15.1.</p>
<p>The <a href="https://minikube.sigs.k8s.io/docs/drivers/docker/" rel="nofollow noreferrer">minikube documentation on the &quot;docker&quot; driver</a> notes, particularly on a native-Linux host, there is not an intermediate virtual machine: if you can run Kubernetes in a container, it can use the entire host system's resources without special configuration or partitioning.  The previous minikube-on-VirtualBox installation required preallocating memory and disk to the VM, and it was easy to get those settings wrong.  Even on non-Linux hosts, if you're running Docker Desktop, sharing its hidden Linux VM can improve resource utilization, and you don't need to decide to allocate exactly 2 GB RAM to Docker Desktop and exactly 4 GB to the minikube VM.</p>
<p>For a long time it's been possible, but discouraged, to run a separate Docker daemon inside a Docker container; similarly, it's possible, but usually discouraged, to run a multi-process init system in a container.  If you do both of these things then you can have the core Kubernetes components (etcd, apiserver, kubelet, ...) inside a single container pretending to be a Kubernetes node.  It also helps here that Kubernetes already knows how to pull Docker images, which minimizes some of the confusing issues with running Docker in Docker.</p>
