Search code examples
dockerubuntuvisual-studio-codevscode-extensions

Failed to connect. Is Docker running? (Vs Code)


I get this error in Ubuntu in vscode and I can't see my images in vscode.

I run sudo docker ps -a and everything is OK on terminal!

What should I do to solve this problem?

enter image description here

enter image description here


Solution

  • I think it can be because your user is not in the docker group. Easily check the list of your user's groups using: groups <user>

    And check in the output if you can see "docker".

    If not, simply add the user to the docker group by typing:

    sudo usermod -aG docker ${USER}

    Don't forget to restart the VS Code and the system if necessary.