Docker is great tool to build a pull-n-run application. But sometimes, your image will be large if you build image from a big base image which has heavy compliling toolbox.
So final image will only contains /test excutable file.
COPY --from=0 means COPY from build has index
0 in Dockerfile.