Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to connect. Is Docker running? #4018

Closed
bruchentalandreea opened this issue Aug 1, 2023 · 4 comments
Closed

Failed to connect. Is Docker running? #4018

bruchentalandreea opened this issue Aug 1, 2023 · 4 comments

Comments

@bruchentalandreea
Copy link

On Ubuntu 18.04 I got this error with Docker extension installed.It shows both at containers and images "Failed to connect. Is Docker installed?" I already tried to get an older version of Docker (1.22.2) or to reinstall the vs code but i get the same error.
I need to mention that I installed the Docker also on the VM, not only the extension.

@bwateratmsft
Copy link
Collaborator

When you say you installed Docker on the VM, do you mean that you are using SSH remoting?

@gaborvar
Copy link

gaborvar commented Aug 2, 2023

I experience similar symptoms: "Failed to connect. Is Docker installed?" appears in he Containers, Images, Contexts and Networks panes of the extension.
This command works fine from a WSL/Ubuntu terminal of VSC:

docker exec -it homeassistant bash

According to the installation instructions docker group membership is required for the account created in the WSL/Ubuntu environment for accessing Docker. I validated this (and the above docker command would not execute either I guess), however I am wondering if the Windows account under which VSC is running may also have to be authorised.

I did not deploy Docker Desktop and I don't intend to.
I don't see obvious issues in settings.json:
{
"workbench.colorTheme": "Default High Contrast Light",
"docker.commands.attach": "${containerCommand} exec -it ${containerId} ${shellCommand}",
"docker.commands.run": "${containerCommand} run --rm -d ${exposedPorts} ${tag}"
}

Troubleshooting tips on https://github.com/microsoft/vscode-docker/wiki/Troubleshooting refer to a remote development scenario but in my case all layers are on the same Windows machine, although Docker runs in WSL/Ubuntu and VSC runs on the Windows 10 host on the same machine. From what I understand about WSL I assume I don't have to duplicate tooling across the Windows and the Linux/Ubuntu layer running in it.

VSC Version: 1.80.2 (user setup)
ms-azuretools.vscode-docker
v1.26.0

WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3208

wsl -l -v    
  NAME      STATE           VERSION
* Ubuntu    Running         2    

Docker version 20.10.21, build 20.10.21-0ubuntu1~22.04.3

Am I missing anything?

@bwateratmsft
Copy link
Collaborator

Running of the Docker commands in WSL is not currently supported, this is being tracked in #3803. If you use WSL remoting everything should work.

@AzCode-Bot
Copy link
Collaborator

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@AzCode-Bot AzCode-Bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2023
@microsoft microsoft locked and limited conversation to collaborators Oct 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants