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

Docker build targets included with default Visual Studio templates don't work because HTTPS is half set up #57181

Closed
catmanjan opened this issue Aug 5, 2024 · 5 comments
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework bug This issue describes a behavior which is not expected - a bug. untriaged

Comments

@catmanjan
Copy link

I couldn't find a Visual Studio Github to report this, but basically the out of the box dotnet templates that most dotnet developers will be using as their first foray into Docker do not work.

The dotnet templates host web services over HTTPS and as such the docker launch target is configured to use SSL, however there is no automatic set up/default creation of development certificates so debugging docker will never work.

If you target something like IIS Express or Kestrel you will be prompted to generate development certificates and Visual Studio will do the registration for you.

@catmanjan catmanjan added bug This issue describes a behavior which is not expected - a bug. untriaged labels Aug 5, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Aug 5, 2024
@richlander richlander transferred this issue from dotnet/dotnet-docker Aug 5, 2024
@lbussell
Copy link

lbussell commented Aug 6, 2024

Hi @catmanjan, the repo to file issues about the Visual Studio Containers tooling is https://github.com/microsoft/dockertools.

I am interested in your scenario though. Are you able to try out debugging using any of the samples in this repo? They are similar to the VS built-in templates. If there's something we're missing, we'd like to know. https://github.com/dotnet/dotnet-docker/tree/main/samples/aspnetapp

I also wonder if Container Fast Mode debugging in Visual Studio would make a difference here: https://aka.ms/containerfastmode

@catmanjan
Copy link
Author

@lbussell I think the main reason to use Visual Studio is the debug tools, but I don't see any debug instructions here - at the moment with Kestrel/IIS Express the developer just needs to press the big green debug button and it all just works, but with Docker it will only work if you disable SSL :(

@catmanjan
Copy link
Author

@camrionnvmff I'm sure there is a solution, but it should "just work" like the other build targets... either disable SSL by default or script all these extra steps so they automatically happen...

Also modifying the dockerfile as your suggest is not ideal because it has a password in it, and you will now have to maintain a debug and a production dockerfile

@amcasey
Copy link
Member

amcasey commented Aug 6, 2024

@catmanjan Can you please follow up on https://github.com/microsoft/dockertools as @lbussell suggested? I'd transfer it for you, but GitHub doesn't support transfers between orgs (i.e. dotnet to microsoft).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework bug This issue describes a behavior which is not expected - a bug. untriaged
Projects
Status: Done
Development

No branches or pull requests

4 participants
@catmanjan @amcasey @lbussell and others