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

No containers/images/etc. listed in extension when docker is installed via snap package #3843

Open
danegsta opened this issue Feb 23, 2023 · 7 comments
Milestone

Comments

@danegsta
Copy link
Contributor

We've received a number of different reports recently of a particular bug on Linux systems that results in the Docker extension not showing any containers, images, etc. despite seeing one or more results when enumerating resources with the Docker CLI from the terminal. We've tracked down what we believe to be the most common root cause of the issue to the snap application sandbox blocking access to some resources when a snap install of Docker is called from a snap install of VSCode.

We're still investigating what would be required to fix this issue (or if it's something that would require an external fix somewhere like the Docker snap package itself), but we've identified a manual workaround that should unblock users of the extension. If you update the Docker Path property in your VSCode settings to /snap/docker/current/bin/docker the extension should start listing resources correctly again. If you see any errors after updating the Docker Path property, please double check that you installed Docker via snap and that it installed the Docker snap resources to the default path.

@chardso
Copy link

chardso commented Sep 26, 2023

was facing the same challenge,but hope here after,my journey towards my career development gonna flourish.

@cathalmchale
Copy link

I'm running into this issue. I'm finding that docker tasks will execute successfully (albeit, no progress output in the console), but images, containers don't show in the extension UI.

However, if I update the Docker Path as above, the UI still not working, but I actually break the docker tasks now! This is an example of the error I get in the tasks console:

/snap/docker/current/bin/docker: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.32' not found (required by /snap/docker/current/bin/docker) /snap/docker/current/bin/docker: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by /snap/docker/current/bin/docker)
Process exited with code 1

@cathalmchale
Copy link

Could it just be permissions? I've added my user to the docker security group. Is that the user that the extension UI assumes? The reason I ask is that, when I change the Docker Path setting, the UI has message like "Docker not found, are you sure it's installed", but if I get rid of that setting (so that tasks work - back to using command "docker" rather than "/snap/docker/current/bin/docker") then the UI simply says "No items found" for images and "Tutorial: Get started with Docker" for containers.

Actually, as I say this, it's probably not permissions, but rather that the console output is being suppressed, as observed in the (successful) Docker Task console.

@bwateratmsft bwateratmsft unpinned this issue Oct 20, 2023
@SchuhMichael
Copy link

I saw this on 6.2.0-34-generic #34~22.04.1-Ubuntu with snap installation latest/stable: d037ac07 2023-11-01 and Docker extension v1.27.0.
In the terminal in code it gave /snap/bin/docker as output of which docker command. Setting the Docker Path variable to this value did not help. But surprisingly, setting it to /snap/docker/current/bin/docker worked.
Looks to me like the link is not followed: /snap/bin/docker -> /usr/bin/snap

@danegsta
Copy link
Contributor Author

danegsta commented Nov 5, 2023

The binary at /snap/bin/docker is a snap wrapper for the Docker binary which has additional sandboxing that fails when run from another snap wrapped app (the standard vscode install on Ubuntu is often a snap app). The Docker binary at /snap/docker/current/bin/docker is the raw Docker binary. I haven’t had a chance to check out the current state of the underlying issues, but last I checked, the errors are at the low level snap sandbox implementation and seem to be unrelated to Docker or VSCode specifically.

@aalavandhaann
Copy link

/snap/docker/current/bin/docker

You saved me one hell of a nightmare. Thank you very much. Your solution works for me.

Regards,
#0K

@pedroachagas
Copy link

/snap/docker/current/bin/docker

Worked for me too, perfectly!

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

8 participants
@cathalmchale @dbreshears @pedroachagas @aalavandhaann @SchuhMichael @danegsta @chardso and others