COPY bin/Release/net5.0/publish .
It works fine. WTF are they talking about a mismatch between explicit definition and the .NET build process? COPY bin/Release/net5.0/publish .
It works fine. WTF are they talking about a mismatch between explicit definition and the .NET build process?A modern variation of “embrace, extend, extinguish”. I doubt MS has the power or desire to extinguish containers, but getting a foot in to the deployments space would be a win for them “use dotnet because it deploys better than other solutions”.
IMO for a significant part of the user base there's no reason to have to manage that at all - .NET is capable of cross-targeting enough to not need to perform the build inside of a container. That keeps the user in the 'build context' that they are used to, and we can use all of that context to still end up at the ideal result - a correct container, with all of their app dependencies.
I personally don't -- I publish on the host build agent and just Dockerize the publish directory