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

podman support for vscode:extension/ms-vscode-remote.remote-containers #7526

Open
elasticdotventures opened this issue May 15, 2022 · 4 comments
Assignees
Labels
containers Issue in vscode-remote containers feature-request Request for new features or functionality podman Dev Container using Podman
Milestone

Comments

@elasticdotventures
Copy link

elasticdotventures commented May 15, 2022

Hi, I'm trying to build an application inside VS-Code and using podman for OCI not docker.
The extension
vscode:extension/ms-vscode-remote.remote-containers

presently as described/deployed here:
https://code.visualstudio.com/docs/remote/containers-tutorial

does not present work with podman (I don't alias docker to podman) and I'm hope to find a link to the best way to add//fix this code for my project

https://github.com/elasticdotventures/candi-date

@MrGenAI
Copy link

MrGenAI commented May 27, 2022

Hello,

I wanted to add I am also experiencing this issue and found a Stack Overflow post with the exact same problem I am facing:
https://stackoverflow.com/questions/72297060/what-could-be-the-reason-why-podman-isnt-working-on-remote-containers

As an aside, I was able to successfully develop in a container using Docker Desktop on my machine (Windows 11, WSL2 - Debian).

While I haven't seen any formal Microsoft documentation on using "Remote - Containers" extension with Podman, I followed the steps outlined here:
https://opensource.com/article/21/7/vs-code-remote-containers-podman

Thanks.

@alexr00 alexr00 assigned chrmarti and unassigned alexr00 May 30, 2022
@jeremyn
Copy link

jeremyn commented Nov 10, 2022

You probably need to set the Podman socket for the VS Code docker.host setting. On an Ubuntu 22.04 host this setting might be unix:///run/user/1000/podman/podman.sock.

Note however that Podman support for VS Code is a little glitchy, see #7175. (FYI I think the https://github.com/microsoft/vscode-remote-release repository is a better place for Podman questions than this one.)

@chrmarti chrmarti transferred this issue from microsoft/vscode Nov 15, 2022
@chrmarti chrmarti added the containers Issue in vscode-remote containers label Nov 15, 2022
@chrmarti chrmarti added feature-request Request for new features or functionality labels Dec 8, 2022
@chrmarti chrmarti modified the milestone: Backlog Dec 8, 2022
@redfave
Copy link

redfave commented Jan 27, 2023

I've done in the way as @jeremyn described it.

Activate rootless socket for user: systemctl --user start podman.socket
The podman socket is up and running.

$ socat - unix:///run/user/1000/podman/podman.sock
$ foo
HTTP/1.1 400 Bad Request
Content-Type: text/plain; charset=utf-8


Connection: close

400 Bad Request

VS Code settings.json (docker.host is deprecated):

{
    "docker.dockerPath": "/usr/bin/podman",
    "docker.environment": {
        "DOCKER_HOST": "unix:///run/user/1000/podman/podman.sock"
    }
}

I still get the message from the extension: "Failed to connect. Is Docker running?"

Ubuntu 22.04 x64
Podman 3.4.4
VS Code 1.74.3
VS Code Docker Extension v 1.23.3

@chrmarti chrmarti added the podman Dev Container using Podman label Jan 30, 2023
@ddosakura
Copy link

ddosakura commented Jun 6, 2023

In addition to configuring dockerPath, dockerComposePath also needs to be set. The following configuration can make it work:

{
  "dev.containers.dockerPath": "/opt/podman/bin/podman",
  "dev.containers.dockerComposePath": "/Users/xxx/.local/share/containers/podman-desktop/extensions-storage/compose/bin/docker-compose"
}

Podman Desktop will add ability to install docker-compose binary system-wide later:

podman-desktop/podman-desktop#2718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Issue in vscode-remote containers feature-request Request for new features or functionality podman Dev Container using Podman
Projects
None yet
Development

No branches or pull requests

8 participants