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 Installed? #4410

Open
k3nd3r9 opened this issue Oct 30, 2024 · 8 comments
Open

Failed to connect. Is docker Installed? #4410

k3nd3r9 opened this issue Oct 30, 2024 · 8 comments

Comments

@k3nd3r9
Copy link

k3nd3r9 commented Oct 30, 2024

Type: Bug

Visual Code fails to realize docker is installed.

I follow the post install instructions:
https://docs.docker.com/engine/install/linux-postinstall/

I can "docker run hello-world" without sudo from terminal.

If I open code with sudo, it is able to run the extension fine.

If I open code normally, it is unable to find the extension, but I can open the terminal and run "docker info" and it reports normally. docker can see images from terminal.

I have added my user to the "docker group"

Seems like a permissions issue.

Ubuntu version 24.04.1 LTS

Extension version: 1.29.3
VS Code version: Code 1.94.2 (384ff7382de624fb94dbaf6da11977bba1ecd427, 2024-10-09T16:08:44.566Z)
OS version: Linux x64 6.8.0-47-generic
Modes:

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i5-12600KF (16 x 4500)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
Load (avg) 1, 0, 0
Memory (System) 31.18GB (28.03GB free)
Process Argv --crash-reporter-id ec332379-b5d7-42fc-bc62-ed95471c8cdc
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE wayland
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
jg8ic977:31013176
dvdeprecation:31068756
dwnewjupytercf:31046870
newcmakeconfigv2:31071590
impr_priority:31102340
nativerepl1:31139838
refactort:31108082
pythonrstrctxt:31112756
wkspc-onlycs-t:31132770
nativeloc1:31134641
wkspc-ranged-t:31151552
cf971741:31144450
iacca1:31156133
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31170013

@bwateratmsft
Copy link
Collaborator

This could be a case where a full system restart is required for permissions to fully propagate. Can you try that if you haven't already?

@k3nd3r9
Copy link
Author

k3nd3r9 commented Nov 1, 2024

Yes, I tried this already.

@bwateratmsft
Copy link
Collaborator

When you open VSCode normally (non-sudo), do you launch it from the terminal or somewhere else?

@k3nd3r9
Copy link
Author

k3nd3r9 commented Nov 3, 2024

I launch it from the ubuntu apps normally. However this results in docker not being found. I got around this by launching in terminal with root access to find it could then see docker.

@bwateratmsft
Copy link
Collaborator

This might be a snap issue. Can you try the workarounds in here and see if that works?

@nanachan3835
Copy link

You can remove CODE config in ~/.config and then relogin VSCODe (non-sudo), after that you can see docker extension icon appear in taskbar. Remember sync this setting to your account. This work for me, you can try it. Hope you can fix this problem soon.

@niloykashyap
Copy link

niloykashyap commented Nov 8, 2024

Encountered the exact same issue. Followed all the steps mentioned

  1. Added user to the group 'docker'
  2. Confirmed changes after logging out and logging back in.
  3. Able to use all docker commands without using sudo when using the terminal.
  4. Issue persists only with VSCode not being able to detect the containers and images when VSCode is run as a non-root user.

Resolution: Device needs a full reboot for the changes to be reflected on VSCode. A logout is NOT sufficient.

@bwateratmsft
Copy link
Collaborator

@k3nd3r9 any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants