Mounting docker.sock does not work in k8s

It does not print anything until timeout

The step is copied from https://docs.drone.io/pipeline/docker/syntax/steps/

kind: pipeline
name: test-docker

clone:
  disable: true

steps:
- name: build
  image: docker
  # privileged: true # even using privileged mode does not work
  commands:
    - docker build .
  volumes:
    - name: docker
      path: /var/run/docker.sock

volumes:
  - name: docker
    host:
      path: /var/run/docker.sock

Does it have any way to solve this except using docker-in-docker method?

on kubernetes you cannot mount files or sockets, you need to mount folders. For example /var/run/.

This worked on 0.8.x! what has changed?

Nothing changed with the Docker runtime, but from what I can gather you have changed your installation to use the experimental Kubernetes runtime. This has different performance and runtime characteristics. The documentation also warns that the Kubernetes runtime is not recommended for production use [1].

[1] https://docs.drone.io/installation/github/kubernetes/