Bird
0
0

What is the role of the image keyword in a GitLab CI job that uses Docker?

easy📝 Conceptual Q1 of 15
Docker - in CI/CD
What is the role of the image keyword in a GitLab CI job that uses Docker?
AIt specifies the Docker image used to run the job's commands
BIt defines the Docker image to be built during the job
CIt lists all Docker images available on the runner
DIt sets the base image for the GitLab Runner itself
Step-by-Step Solution
Solution:
  1. Step 1: Understand the image keyword in GitLab CI

    The image keyword tells GitLab which Docker image to use to run the job's commands inside a container.
  2. Step 2: Differentiate from other options

    It does not build images or list images; it only selects the environment for the job execution.
  3. Final Answer:

    It specifies the Docker image used to run the job's commands -> Option A
  4. Quick Check:

    image keyword = specifies job runtime image [OK]
Quick Trick: image sets the container environment for the job [OK]
Common Mistakes:
  • Confusing image with build instructions
  • Thinking image lists available images
  • Assuming image changes the runner itself

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes