Q. Which command is used to remove a Docker container?

  • (A) docker delete
  • (B) docker rm
  • (C) docker remove
  • (D) docker discard
πŸ’¬ Discuss
βœ… Correct Answer: (B) docker rm
Explanation: The 'docker rm' command is used to remove one or more Docker containers. Use 'docker rm <container_id>' to delete a specific container.

Q. Which command is used to start a stopped Docker container?

  • (A) docker start
  • (B) docker run
  • (C) docker launch
  • (D) docker restart
πŸ’¬ Discuss
βœ… Correct Answer: (A) docker start
Explanation: The 'docker start' command is used to start a stopped container. Use 'docker start <container_id>' to start a specific container.

Q. What is the purpose of Docker Compose?

  • (A) To build Docker images
  • (B) To manage multi-container Docker applications
  • (C) To monitor Docker containers
  • (D) To configure Docker networks
πŸ’¬ Discuss
βœ… Correct Answer: (B) To manage multi-container Docker applications
Explanation: Docker Compose is a tool used to define and manage multi-container Docker applications using a YAML file.

Q. Which command is used to pull an image from Docker Hub?

  • (A) docker fetch
  • (B) docker pull
  • (C) docker download
  • (D) docker get
πŸ’¬ Discuss
βœ… Correct Answer: (B) docker pull
Explanation: The 'docker pull' command is used to download an image from Docker Hub or another Docker registry.

Q. What is a Docker container?

  • (A) A running instance of a Docker image
  • (B) A file containing Docker configurations
  • (C) A blueprint for creating Docker images
  • (D) A service that runs on Docker Hub
πŸ’¬ Discuss
βœ… Correct Answer: (A) A running instance of a Docker image
Explanation: A Docker container is a running instance of a Docker image that is isolated from the host system.

Q. Which command can be used to get detailed information about a Docker container?

  • (A) docker inspect
  • (B) docker details
  • (C) docker info
  • (D) docker show
πŸ’¬ Discuss
βœ… Correct Answer: (A) docker inspect
Explanation: The 'docker inspect' command is used to get detailed information about a container or image.

Q. How can you limit the memory usage of a Docker container?

  • (A) --memory-limit
  • (B) --max-memory
  • (C) --mem
  • (D) --memory
πŸ’¬ Discuss
βœ… Correct Answer: (D) --memory
Explanation: The '--memory' flag is used to limit the memory usage of a Docker container.

Q. What is a Docker volume?

  • (A) A directory that is used to store container data
  • (B) A file that describes how a container should behave
  • (C) A network connection between containers
  • (D) A layer of a Docker image
πŸ’¬ Discuss
βœ… Correct Answer: (A) A directory that is used to store container data
Explanation: A Docker volume is a persistent storage mechanism for Docker containers, which helps store data outside the container.

Q. Which command is used to tag a Docker image?

  • (A) docker image tag
  • (B) docker tag image_name
  • (C) docker tag
  • (D) docker tag-image
πŸ’¬ Discuss
βœ… Correct Answer: (A) docker image tag
Explanation: The 'docker image tag' command is used to create a tag for an image.

Q. Which command is used to pull a Docker image from Docker Hub?

  • (A) docker pull image_name
  • (B) docker download image_name
  • (C) docker fetch image_name
  • (D) docker import image_name
πŸ’¬ Discuss
βœ… Correct Answer: (A) docker pull image_name
Explanation: The 'docker pull' command is used to pull a Docker image from a registry, such as Docker Hub.