Reputation: 1438
I have some .Net Core projects which have reference to one project (library) in the solution. I run them using docker-compose, and have the context set to solution root (src/) so that they all see the library. It works well, but I can't run just a single project using VS built-in docker (as it has context set to project root, not solution). How could I set the context settings for the project, while not breaking the docker-compose functionality?
Upvotes: 1
Views: 671
Reputation: 3985
Your VS project file has an MSBuild property named DockerfileContext
. Just crack open the project file in a text editor and you'll see it defined in a <PropertyGroup>
. By default, it's set to ".
", meaning the same directory as the project. You can set this to whatever you'd like. For example, to set it to the project's parent directory it would be set to "..\
".
Upvotes: 1