Yes, Docker images are layered. When you build a new image, Docker does this for each instruction (RUN, COPY etc.) in your Dockerfile:
- create a temporary container from the previous image layer (or the base
FROMimage for the first command; - run the Dockerfile instruction in the temporary “intermediate” container;
- save the temporary container as a new image layer.
The final image layer is tagged with whatever you name the image – this will be clear if you run docker history raghavendar/hands-on:2.0, you’ll see each layer and an abbreviation of the instruction that created it.
Your specific queries:
1) 532 is a temporary container created from image ID b17, which is your FROM image, ubuntu:14.04.
2) ea6 is the image layer created as the output of the instruction, i.e. from saving intermediate container 532.
3) yes. Docker calls this the Union File System and it’s the main reason why images are so efficient.