Containers

How docker image build works?

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

  1. Docker spins up a temporary container
  2. Runs a single instruction in the temporary container
  3. Stores the result as a new image layer
  4. Remove the temporary container
  5. Repeat for every instruction