I have tried to look for this, and haven’t found. Sorry if it’s a duplicate. So here it goes:
I am a .NET developer. New to the docker world.
When it comes to create an image for my application, my approach would be compiling and Unit Tests in CI platform (outside any container), then create image from the output of the build. Then push those images. Then deploy the app and run some integration tests… You get it. That image wouldn’t use any SDK image, just the bare runtime.
Then I read that docker supports multi stage, which is a strategy to first get an image with the full SDK then do the build and unit tests inside, then create another image based on the runtime copying the binaries from the previous container.
I don’t get it. Is it supposed to be better than my approach? I believe the output would be the same, with the same size. An I believe my approach to be way easier.
Please tell me: what am I missing?
Thanks a huge lot