How to stop Docker (and Kubernetes) using Docker desktop?

The docker desktop app starts a qemu vm, so the desktop app has no control over the PIDs.
To overcome the “situation” do the following:

  • open the Terminal app

  • edit the file ~/.bash_profile

  • add the following lines

    #macro to kill the docker desktop app and the VM (excluding vmnetd -> it's a service)
    function kdo() {
      ps ax|grep -i docker|egrep -iv 'grep|com.docker.vmnetd'|awk '{print $1}'|xargs kill
    }
  • save the file

Quit the terminal app and open it again.

Type kdo to kill all the dependend apps (hypervisor, docker daemon etc.)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)