QuestionQ95

Container and Container Orchestration

To avoid creating too many layers, you can execute multiple commands after the RUN instruction in a Dockerfile, separating them with two consecutive ampersands (&&).

  • A TRUE
  • B FALSE
Explanation

A shell-form RUN instruction can chain commands with &&; all chained commands execute as part of that one RUN instruction, which creates a single image layer rather than a separate layer per command.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!