<p>Since K8S v1.11 Runtime was changed from dockerd to containerd.
I'm using Jenkins over kubernetes to build docker images using Docker outside of Docker (dood).</p>

<p>When I tried to switch to use the socket file from conatinerd (containerd/containerd.sock was mapped ad /var/run/docker.sock) with the regular docker client a got the following error <code>Get http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/json: net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x00\x00\x00\x04\x00\x00\x00\x00\x00".</code></p>

<p>Can docker client be used with containerd?</p>

<p>Disclaimer: as of this writing containerd didn't replace Docker, you can <a href="https://github.com/containerd/cri/blob/master/docs/installation.md" rel="nofollow noreferrer">install containerd</a> separately from Docker, and you can point the <a href="https://kubernetes.io/docs/setup/cri/" rel="nofollow noreferrer">Kubernetes CRI</a> to directly talk to the containerd socket.</p>

<p>So, when you install Docker it does install together with containerd and the <em>Docker daemon</em> talks to it. You'll see a process like this:</p>

<pre><code>docker-containerd --config /var/run/docker/containerd/containerd.toml
</code></pre>

<p>However, the Docker client still talks to the Docker daemon, that's why when you run the Docker client in your container you still need to talk directly to the Docker daemon (<code>/var/run/docker.sock</code>), so you can switch back to <code>/var/run/docker.sock</code> and I believe it should work.</p>
