|
The following VS Code setting only works for rootless Podman contexts: "containers.containerClient": "com.microsoft.visualstudio.containers.podman"Is there a way to modify this setting—or adjust the extension itself—so that it can work with rootful Podman as well? Currently, attempting to use this with a rootful Podman setup (for example, when using macvlan networks or other root-only features) does not work, because the extension expects a rootless context and does not invoke |
Replies: 2 comments 2 replies
|
I haven't tried it, but you might be able to make it work using the |
✅ Solution that worked for me with the Container Tools extensionThe extension doesn’t run in a shell, so aliases and shell functions won’t work. I was able to make it work by introducing a wrapper script and configuring passwordless sudo.
|
✅ Solution that worked for me with the Container Tools extension
The extension doesn’t run in a shell, so aliases and shell functions won’t work. I was able to make it work by introducing a wrapper script and configuring passwordless sudo.
Wrapper script
Replace
/usr/local/bin/podmanwith a script that invokessudo podman-real:Passwordless sudo
Ensure both
podmanandpodman-realcan run without prompting for a password by updating sudoers: