Skip to main content

DVA-C02 practice question · Deployment

A CodeBuild project needs to build a Docker image and push it to ECR as part of a CI pipeline running inside CodeBuild's…

A CodeBuild project needs to build a Docker image and push it to ECR as part of a CI pipeline running inside CodeBuild's own managed build environment (not a customer-managed one). What must be enabled for the Docker build commands to work?

  • APrivileged mode on the CodeBuild project, since building Docker images requires access to a Docker daemon
  • BA larger compute type, with no other configuration change needed
  • CDisabling the project's VPC configuration entirely
  • DNothing special is needed; Docker commands work in any CodeBuild project by default
Show the answer and explanation

Correct answer: A) Privileged mode on the CodeBuild project, since building Docker images requires access to a Docker daemon

Why each option is right or wrong

  • A) Correct. Running Docker build commands (which need a Docker daemon) inside CodeBuild's containerized build environment requires enabling privileged mode on the project; without it, Docker-related commands like `docker build` will fail.
  • B) Incorrect. A bigger compute type alone doesn't provide access to a Docker daemon — privileged mode is the specific setting needed for Docker commands to function in CodeBuild's environment.
  • C) Incorrect. VPC configuration is unrelated to whether Docker commands can run; privileged mode is the actual requirement here.
  • D) Incorrect. Without privileged mode explicitly enabled, Docker build commands fail in CodeBuild's build environment — this option incorrectly claims no configuration is needed.
Exam domain
Deployment · 24% of DVA-C02
Question type
Multiple choice (one answer)

Practise the full DVA-C02 exam

This question is one of a small free sample from the CertRidge DVA-C02 bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with AWS; never copied from the real exam.

Worth reading: DVA-C02 cheat sheet, Lambda, DynamoDB, API Gateway, IAM and Cognito, messaging, CI/CD and X-Ray in tables, plus what DVA-C03 changes.