<p>Currently we are using <a href="https://hub.docker.com/_/docker/" rel="noreferrer">dind</a>(we are not mounting docker.sock from host) on kuberenetes to build container images and also to run containers inside container for running unit tests. With Dockershim deprecation in <a href="https://kubernetes.io/blog/2020/12/02/dockershim-faq/" rel="noreferrer">Kubernetes</a>, I am trying to analyze whether dind will still work on kubernetes without dockershim and with containerd runtime.</p>
<p>I tried running dind pod on gcp and aws eks with containerd container runtime with kubernetes 1.21 release. It worked without any issue in privileged mode. But I am confused how it can even work as dind is docker in docker and not docker in containerd. I did some research, but still cannot figure out how this works and whether it will work with kubernetes 1.24 release. Can someone help?</p>
<p>I used below spec for testing on kubernetes with containerd runtime</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    run: dind
  name: dind
spec:
  containers:
  - image: docker:20.10.12-dind
    name: dind
    ports:
    - containerPort: 2375
    securityContext:
     privileged: true
    env:
    - name: DOCKER_TLS_CERTDIR
      value: ''
  - name: client
    image: ubuntu:latest
    command:
    - sleep
    - infinity
    env:
    - name: DOCKER_HOST
      value: tcp://localhost:2375
</code></pre>
<p><a href="https://docs.aws.amazon.com/eks/latest/userguide/dockershim-deprecation.html" rel="noreferrer">AWS userguide regarding dockershim deprecation</a></p>

Sirish
<p>Despite the name docker-in-docker it's actually docker-in-any-compatible-CRI-runtime. This clause confirms it (source <a href="https://kubernetes.io/blog/2020/12/02/dockershim-faq/#will-my-existing-docker-images-still-work" rel="nofollow noreferrer">https://kubernetes.io/blog/2020/12/02/dockershim-faq/#will-my-existing-docker-images-still-work</a>):</p>
<blockquote>
<p>Yes, the images produced from docker build will work with all CRI implementations. All your existing images will still work exactly the same.</p>
</blockquote>
<p>So if you aren't using <code>/var/run/docker.sock</code> you're good.</p>
