-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
The "docker" container runtime does not have full support for new Kubernetes features.
The dockershim successor since v1.24, cri-dockerd, is not fully maintained and supported.
But the "containerd" container runtime does not have support for the Docker REST API.
Instead there is a small middleware, nerdctld, that is translating API calls to the nerdctl CLI.
The best would be if the supported container runtime could run the supported daemon.
Then you wouldn't need to have cri-dockerd and nerdctld, but only containerd and docker.
The dockerd (daemon) would only be started on-demand (socket activated), not by default.
When using minikube image, there is no need for docker - it only needs containerd/buildkit.
The docker snapshotter is replaced with containerd, and docker build is replaced with buildkit.
This change has already happened in Docker Desktop, but it is still optional in Docker Engine.
https://docs.docker.com/engine/storage/containerd/ (overlay2 -> io.containerd.snapshotter.v1)
The "docker buildx" plugin uses BuildKit, and it has replaced the legacy "docker build" builder.
By configuring Docker to use the "k8s.io" namespace instead of "moby", it sees the same images.
This is similar to how Podman sees the same images as cri-o, since it only has a single namespace.
This way, the feature of minikube docker-env building images for Kubernetes is still preserved...
{
"features": {
"containerd-snapshotter": true
},
"containerd-namespace": "k8s.io"
}NOTE: This changes the storage directory used, from /var/lib/docker to /var/lib/containerd