Closed jzabroski closed 4 years ago
I think I see what you're doing. You're ONLY copying the csproj, and then running restore on that, so that your nuget packages live on a single layer per project. Then you're copying the source code.
Can I ask why you do this idiom? It's not explained in your article, and while I get that your article is about integration testing and not this, it's not a trick I've seen anyone else do.
This guy has a weird approach, too.
The only other place I can find your idiom is here:
https://www.hanselman.com/blog/BuildingRunningAndTestingNETCoreAndASPNETCore21InDockerOnARaspberryPiARM32.aspx https://stackoverflow.com/a/50698655/1040437
https://github.com/acraven/microservice-outsidein-tests/blob/5f0b08cc359f9dc5402701d22f4c16ef17819e6f/app/Dockerfile#L12
Reading this, I didn't understand what you were achieving by running this. Even after reading the documentation, I still don't get it. Isn't this copying the build context into /app? But you already copied all the data in /app individually.