what's the final output image in multistage build? Below is the dockerfile that creates an image:
FROM diamol/base AS build-stage                  
RUN echo 'Building...' &gt; /build.txt             

FROM diamol/base AS test-stage
COPY --from=build-stage /build.txt /build.txt
RUN echo 'Testing...' &gt;&gt; /build.txt              

FROM diamol/base
COPY --from=test-stage /build.txt /build.txt
RUN echo 'Done...' &gt;&gt; /build.txt               

and my understanding is, the final image consists layers of diamol/base and the layer created after the last RUN command as picture below shows:

Is my understanding correct?
The final image will have all the layers from diamol/base as well as two additional layers - one for COPY and one for RUN command.
File /build.txt will have the following contents:
Building...
Testing...
Done...