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

[Bug]: docker vscode extension v1.23.0 breaks podman compatibility #17306

Open
JustinGrote opened this issue Feb 1, 2023 · 16 comments
Open

[Bug]: docker vscode extension v1.23.0 breaks podman compatibility #17306

JustinGrote opened this issue Feb 1, 2023 · 16 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. ShouldBlog

Comments

@JustinGrote
Copy link

JustinGrote commented Feb 1, 2023

Issue Description

Running v1.22.2, everything works fine. In v1.23+, it appears the json schema may have changed and it is expecting something podman doesn't provide, and errors with invalid json schema in the windows. Reverting to v1.22.2 fixes the issue

Steps to reproduce the issue

Steps to reproduce the issue

  1. Install podman
  2. Install vscode with docker extension
  3. Go to the docker pane, it should automatically connect to the docker named socket and fail with invalid json format
  4. Go to install other version and revert to v1.22.2, things now work as expected

Describe the results you received

image

Describe the results you expected

normal operation
image

podman info output

podman 4.3.1 Windows 11 22H2

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Possible dupe of #17229 and supposedly fixed by #16446 but I tried the 4.4 dev build and it didn't fix the issue.

@JustinGrote JustinGrote added the kind/bug Categorizes issue or PR as related to a bug. label Feb 1, 2023
@Luap99
Copy link
Member

Luap99 commented Feb 1, 2023

If it works with the extension version v1.22.2 but not with v1.23 wouldn't this be a regression in the vscode extension?

In any case if there is something we are doing wrong we need the exact podman command and what the output is and what it should be in order to fix it.

@JustinGrote
Copy link
Author

@Luap99 it's not the vscode's Docker extension's scope to maintain compatibility with podman, it works just fine with Docker. Podman advertises docker compatability, that's why I filed it here. My guess is that something changed in that version that is looking for something in the json output that podman isn't providing, I'll see if I can hunt down a specific commit.

I could not get any specific output from the extension itself's output window, I'll see if the docker extension has some sort of trace log for the commands its running.

@vrothberg
Copy link
Member

@baude a blog on how to debug podman-machine would be nice (e.g., how to get REST API calls from the machine)

@JustinGrote
Copy link
Author

JustinGrote commented Feb 1, 2023

Matching issue in vscode docker repo: microsoft/vscode-docker#3241
Dupe: microsoft/vscode-docker#3773

Comment explaining the change (they went to all-cli in 1.23): microsoft/vscode-docker#3766 (comment)

@evanshortiss
Copy link

FYI, with the 4.4 Podman release I see that it returns output that is more consistent with the Docker CLI, i.e line delimited JSON objects as the VS Code extension expects. The issue is that the casing of keys is different, e.g Id vs ID, and the VS Code extension fails due to that.

@rhatdan
Copy link
Member

rhatdan commented Feb 2, 2023

If we output with Id and ID would that work?

@evanshortiss
Copy link

evanshortiss commented Feb 2, 2023

@bwateratmsft mentioned in another issue that they're looking into Podman support, so it makes sense to loop them in before changing anything IMO.

Edit: I see this has been discussed here, so all good I think?

@github-actions
Copy link

github-actions bot commented Mar 5, 2023

A friendly reminder that this issue had no activity for 30 days.

@lgonzalezsa
Copy link

lgonzalezsa commented Mar 8, 2023

facing same issue but notice that also podman dashboard is complaining about the docker socket compatibility.

certainly revert back to docker vscode extension helps to make vscode to work again with podman, why podman dashboard is generating that warning.

I followed the tutorial https://podman-desktop.io/docs/troubleshooting#warning-about-docker-compatibility-mode
I am in Linux as primary OS, and I do not have docker desktop, based on the documentation:

Restart the Podman machine (the default Docker socket path will be recreated and Podman will emulate it)

but seems not emulating it.

image

@zastrixarundell
Copy link

zastrixarundell commented Apr 5, 2023

Probably caused by removing the docker.path setting in the extension. Can't make it connect to the podman socket in any form. Remote container runs well but I can't make the docker extension work.

@rhatdan
Copy link
Member

rhatdan commented Apr 6, 2023

Setting the DOCKER_HOST environment doesn't work?

Have you reported this issue to the people who ship the docker vscode extension? (Microsoft?) or ask them to have a Podman extension?

@JustinGrote
Copy link
Author

JustinGrote commented Apr 6, 2023

@rhatdan yes, it's been reported: microsoft/vscode-docker#3241

currently the only option is to downgrade the Docker extension. A quick fix is possible per #17306 (comment) but the Docker extension team has opted to instead provide full explicit support for podman (no ETA given so far)

@mash-graz
Copy link

It's a pity that this problem is still not solved and we have to use an outdated version of the plugin.

@rhatdan
Copy link
Member

rhatdan commented Feb 14, 2024

@n1hility PTAL

@ShyamBhattacharyya
Copy link

ShyamBhattacharyya commented Aug 23, 2024

For your information, a new extension for accessing podman from VS Code has come up by @dreamcatcher45 named Pod Manager. It is working fine with podman containers. Give it a try. https://marketplace.visualstudio.com/items?itemName=dreamcatcher45.podmanager&ssr=false#overview

image

@rhatdan
Copy link
Member

rhatdan commented Aug 26, 2024

Very nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. ShouldBlog
Projects
None yet
Development

No branches or pull requests

9 participants