What do all the pull statements mean?

I am trying to understand the output of a docker build command for popular images e.g. node. Here is the Dockerfile I used.

FROM node:10

Which Dockerfile refers to node:10 in Docker Hub?

The docker build command has the following output:

Step 1/1 : FROM node:10
10: Pulling from library/node
9a0b0ce99936: Pull complete
db3b6004c61a: Pull complete
f8f075920295: Pull complete
6ef14aff1139: Pull complete
0bbd8b48260f: Pull complete
524be717efb1: Pull complete
5216176a8ae7: Pull complete                                                                                                                                                                  30f1e4a2facd: Pull complete
823c0b3f4fa2: Pull complete                                                                                                                                                                  Digest: sha256:dabc15ad36a9e0a95862fbdf6ffdad439edc20aa27c7f10456644464e3fb5f08
Status: Downloaded newer image for node:10
 ---> e45bc9197ec9
Successfully built e45bc9197ec9

What do all the Pull complete refer to? The layer ID e45bc9197ec9 refers to the final image. From a running container, is it possible to ‘reverse lookup’ e45bc9197ec9 and get all the pull digests?

Docker images are layered. Nearly every commands in a Dockerfile will produce a layer. The final image is the sum of each layer.

Your FROM statement ask Docker to base your image on top of node:10 image. So this image have to be downloaded/pulled. To pull/download an image is to pull/download all its layers. Obviously, the “Pull complete” here mean that the layer have been downloaded and unpacked succesfully.
Have a look at the result of the command docker inspect node:10. It will list you all the same layer with the same IDs.
Here the “e45bc9197ec9” id is not a layer ID but an image ID. you can give that image a human readable name with docker tag e45bc9197ec9 mynode. And if you do a docker inspect e45bc9197ec9 you’re going to see the exact same layers in the image as the node:10 image.

1 Like

Thanks! Just two things.

  1. Which Dockerfile does node:10 point to? I could not interpret this page clearly.
  2. You are saying that, every command in the Dockerfile corresponds to a pull?