Which instruction allows the Dockerfile to accept variables at build time?

  1. ENV
  2. ARG
  3. CMD
  4. COPY
Correct answer ARG

Explanation

ARG is used to define build-time variables that can be passed using `--build-arg`.

Update: Admin added a tag on this question

Topics

By Admin · · 42 views