Bird
0
0

In GitLab CI, why do we use the services keyword with Docker?

easy📝 Conceptual Q2 of 15
Docker - in CI/CD
In GitLab CI, why do we use the services keyword with Docker?
ATo specify the Docker image for the job container
BTo run additional Docker containers alongside the job container
CTo build a Docker image during the job
DTo deploy Docker containers to production
Step-by-Step Solution
Solution:
  1. Step 1: Understand the services keyword

    The services keyword allows running extra Docker containers that the job can interact with, like databases or Docker-in-Docker.
  2. Step 2: Differentiate from other options

    It does not specify the job image, build images, or deploy containers.
  3. Final Answer:

    To run additional Docker containers alongside the job container -> Option B
  4. Quick Check:

    services = extra containers for job [OK]
Quick Trick: services run side containers for job needs [OK]
Common Mistakes:
  • Confusing services with job image
  • Thinking services build images
  • Assuming services deploy containers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes