Question:
I'm trying to use Podman Desktop in Visual Studio 2022's Container Tools for containerized development and debugging of a .NET Core 8 project, but I'm facing some inconsistent issues. Here are the two approaches I've tried so far and the results:
Approach 1 (Higher success rate but still unstable):
%appdata%\Roaming\Docker\settings.json, then close Docker Desktop.npipe:////./pipe/podman-machine-default.Result: Sometimes the debugging works, but other times it fails when build image with unclear error messages Unabled to find image 'webapplication:dev' locally docker: Error response from daemon {"message":"denied: requested access to the resource is denied"}. or WARNING: No output specified with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load
Additional Observations:
Approach 2 (Able to build the image but debugging fails):
Result:
My Questions: Has anyone successfully used Podman Desktop in Visual Studio 2022 Container Tools for debugging a .NET Core 8 project?
If so, could you share your configuration and steps?
Are there any recommendations to improve the stability of Approach 1 or resolve the debugging issues in Approach 2?
Thank you very much!
There is another approach to getting podman desktop working with both VS2022 and VSCode. There is no need for environment variables or a specific order of install.
winget install RedHat.Podman-Desktop
winget install Docker.DockerCLI
Run podman desktop which will prompt you to install / setup podman. By default, podman machine should redirect api calls to the standard docker api socket so that any docker client should work with podman (including DockerCLI). Having the official docker CLI installed is enough to make VS and VSCode attempt to interact with the docker socket and everything should just work.
Just to be clear, this assumes you do not have docker desktop (or any any other variant of docker or any other container engine) installed at the time you install podman desktop
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With