How are intermediate containers formed?
<p>I would like to understand the execution steps involved in building Docker Images using Dockerfile. Couple of questions I have listed down below. Please help me in understanding the build process.</p>
<h1>Dockerfile content</h1>
<pre><code>#from base image
FROM ubuntu:14.04
#author name
MAINTAINER RAGHU
#commands to run in the container
RUN echo &quot;hello Raghu&quot;
RUN sleep 10
RUN echo &quot;TASK COMPLETED&quot;
</code></pre>
<p>Command used to build the image: <code>docker build -t raghavendar/hands-on:2.0 .</code></p>
<pre><code>Sending build context to Docker daemon 20.04 MB
Step 1 : FROM ubuntu:14.04
---&gt; b1719e1db756
Step 2 : MAINTAINER RAGHU
---&gt; Running in 532ed79e6d55
---&gt; ea6184bb8ef5
Removing intermediate container 532ed79e6d55
Step 3 : RUN echo &quot;hello Raghu&quot;
---&gt; Running in da327c9b871a
hello Raghu
---&gt; f02ff92252e2
Removing intermediate container da327c9b871a
Step 4 : RUN sleep 10
---&gt; Running in aa58dea59595
---&gt; fe9e9648e969
Removing intermediate container aa58dea59595
Step 5 : RUN echo &quot;TASK COMPLETED&quot;
---&gt; Running in 612adda45c52
TASK COMPLETED
---&gt; 86c73954ea96
Removing intermediate container 612adda45c52
Successfully built 86c73954ea96
</code></pre>
<p>In step 2 :</p>
<pre><code>Step 2 : MAINTAINER RAGHU
    ---&gt; Running in 532ed79e6d55 
</code></pre>
<p>Question 1 : it indicates that it is running in the container with id -  532ed79e6d55, but with what Docker image is this container formed ?</p>
<pre><code>---&gt; ea6184bb8ef5  
</code></pre>
<p>Question 2 : what is this id? Is it an image or container ?</p>
<pre><code>Removing intermediate container 532ed79e6d55
</code></pre>
<p>Question 3 : Is the final image formed with multiple layers saved from intermediate containers?</p>