Bitpath

Boss lesson · Unit 01

Images are layers

Names, tags and digests, shared layers and the writable layer on top

13 exercisesabout 3 min

What you practise

  • Pulling, names, tags and digests, layers shared between images, the writable layer on top, registries

Try a question from this lesson

Pick one

Your machine has image A. You pull image B, which was built on the same 90 MB base as A. How much of that base is downloaded for B?

Hint

Images are made of pieces. What happens to a piece you already have?

The ideas

Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.

Concept

What an image is called

A full image name has four parts: registry, namespace, repository and tag.

Leave out the registry and Docker uses Docker Hub (docker.io). Leave out the namespace and it uses library, where the official images live. Leave out the tag and it uses latest.

docker.io / library / python : 3-slim
registry    namespace repo     tag

Concept

Layers, and one on top

Image layers are read-only and shared by every image and container that uses them. Each layer holds only the files that changed from the layer below.

A container adds one writable layer on top. To change a file from the image, the file is first copied up into that layer. The image itself never changes.

[ writable layer   ]  one per container
[ app files        ]  read-only
[ pip packages     ]  read-only
[ base system      ]  read-only

10 more exercises in the app

  • 4× type the answer
  • 3× multiple choice
  • 1× true or false
  • 1× order the lines
  • 1× fill the blanks

Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.

One email when Bitpath is ready to try. Nothing else. Privacy