1

I'm trying to understand the output so that I can better debug.

I'm confused as to what some of these seemingly randomly generated alphanumeric strings mean.

For example:

Successfully built b344b7f40976
Successfully tagged registry.heroku.com/boiling-anchorage-81724/django:latest
=== Pushing django (/Users/sju/Dev/django/django-docker-1/luup/Dockerfile.django)
The push refers to a repository [registry.heroku.com/boiling-anchorage-81724/django]
e6e47ddb916a: Pushed 
c653a8994f81: Pushed 
f3f33e8a7200: Pushed 
3be97181d9ea: Pushed 
0494493cc4fc: Pushed 
72d642705832: Layer already exists 
14250e74103d: Pushed 
e355feaece70: Pushed 
eca7788e251f: Layer already exists 
694f3359e1fc: Pushed 
84e8dee479c4: Pushed 
3e0f5afa8e94: Pushed 
e20ab7df8200: Layer already exists 
b16afe30b3c2: Pushed 
43d1ca0c8750: Pushed 
6f7f56cd7b7f: Pushed 
ef2bc0294f0a: Layer already exists 
93eb6a44e280: Pushed 
7951de54e816: Pushed 
5a6e78989326: Pushed 
6bd7fb7b4551: Pushed 
3bedf5ae1d3d: Pushed 
32d65605e983: Layer already exists 
efa0b7a2d37b: Layer already exists 
fe548f92b224: Layer already exists 
a7d53ea16e81: Mounted from boiling-anchorage-81724/local 
e53f74215d12: Layer already exists 
latest: digest: sha256:442023d6d8a81296f8506b34bda803039c04666db42daf9ca86b8066deb05da5 size: 5943  

I believe the string following Successfully built ... is the image ID.

what are the rest? What are Layers? They seem to rebuild every time I build after making slight modifications to my Dockerfile.
And what does it mean to "mount from"?

Jay Jung
  • 1,805
  • 3
  • 23
  • 46
  • This question explains a bit more about layers: https://stackoverflow.com/questions/31222377/what-are-docker-image-layers. You may also want to check out the Docker storage docs with explain more as well: https://docs.docker.com/storage/storagedriver/ – mcrute Mar 26 '18 at 04:04
  • Each layer gets an ID which is a hash from data in that layer, so that the engine can tell whether it has to rebuild that layer on your next build. If it seems like every layer is rebuilding every time you change code, you have your code in a layer that is too early in the build process and should move it down the Dockerfile past some less-frequently-changed layers. – Dagrooms Mar 27 '18 at 00:52

1 Answers1

1

See "Images and layers" for the layers:

https://docs.docker.com/storage/storagedriver/images/container-layers.jpg

A Docker image is built up from a series of layers. Each layer represents an instruction in the image’s Dockerfile. Each layer except the very last one is read-only.

You can see here how docker push will only push new layers that are not yet in the Docker registry.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250