Machine-translated by Google. Questions are authored in English.
Top

Discussion

Assertion (A): Two images built from the same base share storage and transfer costs.
Reason (R): Layers are content addressed and stored once however many images reference them.

  • A.A is false but R is true
  • B.Both A and R are true, and R is the correct explanation of A
  • C.Both A and R are true, but R is not the correct explanation of A
  • D.A is true but R is false

Answer: B

Correct answer: Both A and R are true, and R is the correct explanation of A

Both are true and the reason gives the mechanism. Each layer is identified by the hash of its content, so two images referencing the same base layer refer to the same object, which is stored once on the host and in the registry and pulled once. Ordering a Dockerfile so that the rarely changing layers come first is how that saving is deliberately maximised.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.