It is typical to use multi-stage builds,
https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Let's say I have a Visual Studio solution with .Net Core Projects and Unit Tests, along with Docker Support (Dockerfile). What is the best practice in this case? I saw some blogs/articles where .Net Core Projects Compilation and Unit Test Execution are all being done inside the same Dockerfile. Is this correct or recommended? If not, what is the best practice? To have separate Dockerfile for Compilation and Unit Tests? If yes, is there any documentation / links, where this is outlined? Please help.
It is typical to use multi-stage builds,
https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds