Advanced Docker Concepts MCQs

  1. Which of the following best describes Docker multi-stage builds?
    a) Optimizing image size by separating build and runtime stages
    b) Running multiple containers in parallel
    c) Managing orchestration of containers
    d) Monitoring container logs
    View Answer

    Correct answer: A — Optimizing image size by separating build and runtime stages

  2. Docker image layers are used to:
    a) Reuse and cache parts of images
    b) Validate performance only
    c) Validate usability only
    d) Validate integration only
    View Answer

    Correct answer: A — Reuse and cache parts of images

  3. Which of the following is true about Docker security best practices?
    a) Use minimal base images
    b) Always run containers as root
    c) Disable logging
    d) Avoid using namespaces
    View Answer

    Correct answer: A — Use minimal base images

  4. Docker resource limits can be set using:
    a) --cpus and --memory flags
    b) Only --cpus flag
    c) Only --memory flag
    d) Only --disk flag
    View Answer

    Correct answer: A — --cpus and --memory flags

  5. Which of the following is true about Docker networking modes?
    a) Bridge, Host, Overlay, Macvlan
    b) Only Bridge
    c) Only Host
    d) Only Overlay
    View Answer

    Correct answer: A — Bridge, Host, Overlay, Macvlan

  6. Docker Swarm provides:
    a) Native container orchestration for Docker
    b) Only performance monitoring
    c) Only usability testing
    d) Only integration testing
    View Answer

    Correct answer: A — Native container orchestration for Docker

  7. Which of the following is true about Docker private registries?
    a) They allow hosting custom images securely
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They allow hosting custom images securely

  8. Docker image signing ensures:
    a) Image authenticity and integrity
    b) Performance validation only
    c) Usability validation only
    d) Integration validation only
    View Answer

    Correct answer: A — Image authenticity and integrity

  9. Which of the following is true about Docker volumes?
    a) They persist data outside containers
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They persist data outside containers

  10. Docker Compose advanced features include:
    a) Defining networks, volumes, and multiple services
    b) Defining only single services
    c) Defining only performance metrics
    d) Defining only usability metrics
    View Answer

    Correct answer: A — Defining networks, volumes, and multiple services

  11. What will be printed?
    1 echo "Eduinq Advanced Docker Test"
    a) Eduinq Advanced Docker Test
    b) Advanced Docker Test
    c) No output
    d) Error
    View Answer

    Correct answer: A — Eduinq Advanced Docker Test

  12. Which of the following is true about Docker health checks?
    a) They monitor container status and restart if unhealthy
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They monitor container status and restart if unhealthy

  13. Docker overlay networks are used for:
    a) Multi-host container communication
    b) Single-host communication only
    c) Manual communication only
    d) Integration testing only
    View Answer

    Correct answer: A — Multi-host container communication

  14. Which of the following is true about Docker secrets?
    a) They store sensitive data securely in Swarm mode
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They store sensitive data securely in Swarm mode

  15. Docker logging drivers include:
    a) json-file, syslog, fluentd
    b) Only json-file
    c) Only syslog
    d) Only fluentd
    View Answer

    Correct answer: A — json-file, syslog, fluentd

  16. Which of the following is true about Docker resource monitoring?
    a) docker stats command shows CPU and memory usage
    b) docker logs command shows CPU usage
    c) docker run command shows memory usage
    d) docker exec command shows disk usage
    View Answer

    Correct answer: A — docker stats command shows CPU and memory usage

  17. Docker Swarm services can be scaled using:
    a) docker service scale command
    b) docker run command
    c) docker logs command
    d) docker exec command
    View Answer

    Correct answer: A — docker service scale command

  18. Which of the following is true about Docker namespaces?
    a) They provide isolation for processes, networks, and mounts
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They provide isolation for processes, networks, and mounts

  19. Docker image pruning is used to:
    a) Remove unused images and free space
    b) Validate performance only
    c) Validate usability only
    d) Validate integration only
    View Answer

    Correct answer: A — Remove unused images and free space

  20. Which of the following is true about advanced Docker networking?
    a) Macvlan allows containers to appear as physical devices on the network
    b) Bridge networking is the only option
    c) Host networking is the only option
    d) Overlay networking is the only option
    View Answer

    Correct answer: A — Macvlan allows containers to appear as physical devices on the network

  21. Which of the following is true about Docker image optimization?
    a) Use smaller base images and multi-stage builds
    b) Always use large base images
    c) Avoid caching layers
    d) Disable pruning
    View Answer

    Correct answer: A — Use smaller base images and multi-stage builds

  22. Docker content trust ensures:
    a) Images are signed and verified before use
    b) Images are always public
    c) Images are stored in plain text
    d) Images are never verified
    View Answer

    Correct answer: A — Images are signed and verified before use

  23. Which of the following is true about Docker Swarm overlay networks?
    a) They enable communication across multiple nodes
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They enable communication across multiple nodes

  24. Docker volume drivers allow:
    a) Integration with external storage systems
    b) Validation of performance only
    c) Validation of usability only
    d) Validation of integration only
    View Answer

    Correct answer: A — Integration with external storage systems

  25. Which of the following is true about Docker resource constraints?
    a) They prevent containers from consuming excessive CPU/memory
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They prevent containers from consuming excessive CPU/memory

  26. Docker Swarm mode supports:
    a) Service discovery and load balancing
    b) Only manual discovery
    c) Only manual balancing
    d) Only integration balancing
    View Answer

    Correct answer: A — Service discovery and load balancing

  27. Which of the following is true about Docker image layering?
    a) Each instruction in Dockerfile creates a new layer
    b) Layers are always merged into one
    c) Layers are ignored during builds
    d) Layers are deleted after builds
    View Answer

    Correct answer: A — Each instruction in Dockerfile creates a new layer

  28. Docker prune commands are used to:
    a) Remove unused containers, images, and networks
    b) Validate performance only
    c) Validate usability only
    d) Validate integration only
    View Answer

    Correct answer: A — Remove unused containers, images, and networks

  29. Which of the following is true about Docker Swarm scaling?
    a) Services can be scaled horizontally by adding replicas
    b) Services can only scale vertically
    c) Services cannot be scaled
    d) Services scale only manually
    View Answer

    Correct answer: A — Services can be scaled horizontally by adding replicas

  30. Docker image digest represents:
    a) A unique hash identifying an image
    b) A performance metric
    c) A usability metric
    d) An integration metric
    View Answer

    Correct answer: A — A unique hash identifying an image

  31. What will be printed?
    1 echo "Eduinq Docker Security Test"
    a) Eduinq Docker Security Test
    b) Docker Security Test
    c) No output
    d) Error
    View Answer

    Correct answer: A — Eduinq Docker Security Test

  32. Which of the following is true about Docker namespaces?
    a) They isolate processes, networks, and mounts
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They isolate processes, networks, and mounts

  33. Docker Swarm manager nodes are responsible for:
    a) Orchestrating and managing cluster state
    b) Running only worker tasks
    c) Running only monitoring tasks
    d) Running only CI/CD tasks
    View Answer

    Correct answer: A — Orchestrating and managing cluster state

  34. Which of the following is true about Docker image caching?
    a) It speeds up builds by reusing unchanged layers
    b) It slows down builds intentionally
    c) It deletes all layers automatically
    d) It disables optimization
    View Answer

    Correct answer: A — It speeds up builds by reusing unchanged layers

  35. Docker secrets in Swarm mode are:
    a) Encrypted and mounted into containers securely
    b) Stored in plain text
    c) Always public
    d) Never used
    View Answer

    Correct answer: A — Encrypted and mounted into containers securely

  36. Which of the following is true about Docker Swarm rolling updates?
    a) They update services gradually without downtime
    b) They update all services at once
    c) They update only staging services
    d) They update only manually
    View Answer

    Correct answer: A — They update services gradually without downtime

  37. Docker image layers can be inspected using:
    a) docker history command
    b) docker logs command
    c) docker exec command
    d) docker run command
    View Answer

    Correct answer: A — docker history command

  38. Which of the following is true about Docker Swarm fault tolerance?
    a) Replicas are redistributed if nodes fail
    b) Replicas are deleted if nodes fail
    c) Replicas are ignored if nodes fail
    d) Replicas are stopped if nodes fail
    View Answer

    Correct answer: A — Replicas are redistributed if nodes fail

  39. Docker image build context includes:
    a) Files in the directory sent to the Docker daemon
    b) Only Dockerfile
    c) Only JSON files
    d) Only XML files
    View Answer

    Correct answer: A — Files in the directory sent to the Docker daemon

  40. Which of the following is true about Docker Swarm service discovery?
    a) Services are automatically assigned DNS names
    b) Services are discovered only manually
    c) Services are discovered only by IP
    d) Services are never discovered
    View Answer

    Correct answer: A — Services are automatically assigned DNS names

  41. Which of the following is true about Docker image optimization techniques?
    a) Minimize layers and use .dockerignore
    b) Always maximize layers
    c) Avoid using .dockerignore
    d) Disable caching
    View Answer

    Correct answer: A — Minimize layers and use .dockerignore

  42. Docker Swarm supports constraints to:
    a) Control placement of services on nodes
    b) Validate performance only
    c) Validate usability only
    d) Validate integration only
    View Answer

    Correct answer: A — Control placement of services on nodes

  43. Which of the following is true about Docker image registries?
    a) They can be public or private
    b) They are always public
    c) They are always private
    d) They are never used
    View Answer

    Correct answer: A — They can be public or private

  44. Docker Swarm overlay networks provide:
    a) Secure communication between services across nodes
    b) Only manual communication
    c) Only single-host communication
    d) Only integration communication
    View Answer

    Correct answer: A — Secure communication between services across nodes

  45. Which of the following is true about Docker image layers?
    a) They are immutable once created
    b) They are always mutable
    c) They are deleted after builds
    d) They are ignored during builds
    View Answer

    Correct answer: A — They are immutable once created

  46. Docker Swarm rolling updates can be configured with:
    a) Update delay and parallelism settings
    b) Only update delay
    c) Only parallelism
    d) Only manual updates
    View Answer

    Correct answer: A — Update delay and parallelism settings

  47. Which of the following is true about Docker image tagging?
    a) Tags identify versions and variants of images
    b) Tags validate performance only
    c) Tags validate usability only
    d) Tags validate integration only
    View Answer

    Correct answer: A — Tags identify versions and variants of images

  48. Docker Swarm supports service constraints using:
    a) Placement rules
    b) Performance rules only
    c) Usability rules only
    d) Integration rules only
    View Answer

    Correct answer: A — Placement rules

  49. Which of the following is true about Docker image digests?
    a) They provide cryptographic verification of images
    b) They validate performance only
    c) They validate usability only
    d) They validate integration only
    View Answer

    Correct answer: A — They provide cryptographic verification of images

  50. Which of the following best describes advanced Docker concepts overall?
    a) Techniques for optimizing, securing, and orchestrating Docker containers
    b) Ensuring only performance correctness
    c) Ensuring only usability correctness
    d) Ensuring only integration correctness
    View Answer

    Correct answer: A — Techniques for optimizing, securing, and orchestrating Docker containers

Quick Links to Explore