skip to Main Content

I have a MacBook M1 and installed WebStorm 2022.2.3 and installed Docker plugin. Then I installed Docker Desktop for Apple Silicon.

The Docker Desktop is working fine but in my WebStorm I got an error when I try to build a .yaml file. The error is that WebStorm cannot connect to the Docker daemon.

I’ve searched for a solution for this error online but had no luck. I installed Brew and Rosetta 2 and the issue is the same.

Has anyone had this kind of issue? Oh, I did not mention that on my Windows laptop this feature works normally 🙂

enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    After trying lots of things I finally manage to get it worked. I completely removed the Docker Desktop, then install again Docker Desktop, and in the terminal run:

    brew install docker-machine docker
    

    After this it worked, and the WebStorm status is now 'Connection successfully'


  2. Docker Desktop for Apple Silicon seems to place the socket at a different place (in the users domain, not in system domain):
    When Docker Desktop is not running, docker shows the error

    Cannot connect to the Docker daemon at unix:///Users/"your_username"/.docker/run/docker.sock. Is the docker daemon running?

    So there are two ways to solve the problem:

    1. configure TCP-Socket instead of "Docker for Mac"
      enter image description here
    2. Symlink the expected system socket path to your personal socket

      sudo ln -s /Users/your_username/.docker/run/docker.sock /var/run/

    the later is only suitable if there is only a single user using Docker an a computer so Docker Desktop is always started by the same user.

    There is no need to install another docker with brew.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search