Quantcast
Channel: How to include files outside of Docker's build context? - Stack Overflow
Viewing all articles
Browse latest Browse all 23

Answer by 123 for How to include files outside of Docker's build context?

$
0
0

Changing the build context is the way to go.

If you have a .net core project and you still want to use the Visual Studio UI to debug/publish the project with docker than you can change the context by adding the "DockerfileContext" to your projects .csproj:

<Project Sdk="Microsoft.NET.Sdk.Web"><PropertyGroup><TargetFramework>net6.0</TargetFramework><DockerDefaultTargetOS>Linux</DockerDefaultTargetOS><DockerfileContext>..\..\.</DockerfileContext></PropertyGroup>  ...</Project>

Do not forget to change the paths in the Dockerfile accordingly.


Viewing all articles
Browse latest Browse all 23

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>