aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 124 forks source link

Docker in launchSettings.json #1074

Open AceHack opened 6 years ago

AceHack commented 6 years ago

Please give documentation on how to add volume mounts. I need to add a custom volume mount into my image.

barrytang commented 6 years ago

To report new issues, use the Report a Problem tool. The GitHub Issue Tracker for the aspnet/Tooling repo is now deprecated in favor of the Report a Problem tool.

If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See here for more details.

AceHack commented 6 years ago

@barrytang This is not an issue but a question. Report a Problem is not for questions, where do I go for questions?

barrytang commented 6 years ago

I apologize. I reopened the issue now. I will see if I can find someone that I can add here to help.

philliphoff commented 6 years ago

@AceHack I'll try to help as best I can. Can you provide a little more context? Which set/version of (VS) tools are you using, what kind of a project(s) is it, etc.?

AceHack commented 6 years ago

Ive expanded on the question a lot on stackoverflow since this was closed.

https://stackoverflow.com/questions/50659392/asp-net-core-custom-docker-volume-mount-in-visual-studio

philliphoff commented 6 years ago

Ah, I see now.

You can add arbitrary arguments to the Docker build and Docker run commands via the DockerfileBuildArguments and DockerfileRunArguments MSBuild properties, respectively. For example:

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <DockerfileRunArguments>-v "C:\HostFolder:/ContainerFolder:ro"</DockerfileRunArguments>
  </PropertyGroup>
</Project>

If those arguments need to vary from debug session to debug session, you can add conditions to the properties such that one applies to each selectable build configuration.

nphmuller commented 6 years ago

@philliphoff Those arguments look exactly like what I need. A couple of questions:

nphmuller commented 6 years ago

DockerComposeProjectPath seems to be another one.