Q1
Q1 What is Docker primarily used for?
To manage databases
To create, deploy, and run applications in containers
To automate software testing
To build mobile apps
Q2
Q2 What is a Docker container?
A lightweight virtual machine
A runtime instance of a Docker image
A storage unit
A command-line tool
Q3
Q3 Which of the following best describes Docker images?
Images are templates used to create containers
Images are running instances of containers
Images store application logs
Images are always public
Q4
Q4 What does the Docker CLI do?
Provides a GUI for Docker
Communicates with the Docker Daemon
Executes containerized applications
Stores Docker images
Q5
Q5 Which of these commands is used to start Docker?
docker start
docker run
systemctl start docker
docker service start
Q6
Q6 What differentiates containers from virtual machines?
Containers virtualize the OS while VMs virtualize hardware
Containers are heavier than VMs
Containers require hypervisors
Containers cannot be used in production
Q7
Q7 Which company originally developed Docker?
Red Hat
Canonical
Docker Inc.
IBM
Q8
Q8 What is the primary advantage of using Docker containers?
They are cheaper than VMs
They provide better network speed
They ensure consistent application environments
They are faster than any other virtualization method
Q9
Q9 Which command is used to list all running containers?
docker ps
docker images
docker list
docker show
Q10
Q10 You run the command 'docker run -p 80:80 nginx', but the container fails to start. The logs show 'port already in use.' What should you do?
Use a different port
Restart Docker
Rebuild the image
Stop the conflicting process
Q11
Q11 What is the role of the Docker Daemon?
Provides a GUI for managing containers
Executes commands sent by the CLI
Manages Docker objects like images, containers, and networks
Stores data for containers
Q12
Q12 Which component of Docker is responsible for interacting with users?
Docker CLI
Docker Registry
Docker Engine
Docker Daemon
Q13
Q13 What is the primary purpose of the Docker Registry?
To manage container networking
To store and distribute Docker images
To execute commands sent by the CLI
To monitor container performance
Q14
Q14 What does the Docker Engine consist of?
CLI, Daemon, and REST API
CLI and Registry
Images and Containers
Only the Docker CLI
Q15
Q15 What is the function of the REST API in Docker?
To create container volumes
To interact programmatically with the Docker Daemon
To monitor container performance
To store Docker images
Q16
Q16 How does the Docker Daemon handle requests?
Directly executes commands
Delegates tasks to CLI
Processes requests via the REST API
Stores images temporarily
Q17
Q17 Which component is responsible for pulling images from a Docker Registry?
Docker CLI
Docker Daemon
Docker Engine
REST API
Q18
Q18 Which command checks the status of the Docker Daemon?
docker ps
docker status
systemctl status docker
docker info
Q19
Q19 The Docker CLI cannot connect to the Docker Daemon. What should you check first?
The container logs
The image configuration
The Docker service status
The network settings
Q20
Q20 Which command is used to install Docker on a Linux system?
apt-get install docker-ce
yum install docker
brew install docker
All of the above
Q21
Q21 What is the default port used by Docker Daemon?
2375
2376
8080
80
Q22
Q22 Which file is used to configure Docker during installation?
docker-compose.yml
config.json
daemon.json
dockerfile
Q23
Q23 How do you check the version of Docker installed?
docker --check
docker version
docker --info
docker config
Q24
Q24 Which flag is used with the 'docker run' command to run a container in detached mode?
-it
-d
-rm
-p
Q25
Q25 What does the 'docker pull' command do?
Creates a container
Removes an image
Downloads an image from a registry
Updates Docker CLI
Q26
Q26 What is the use of the 'docker info' command?
To display Docker configuration and system information
To run a container
To restart Docker
To update Docker
Q27
Q27 How do you start a stopped container?
docker run
docker start
docker restart
docker init
Q28
Q28 Which command lists all Docker images available locally?
docker ps
docker images
docker list
docker pull
Q29
Q29 You get an error 'Cannot connect to the Docker Daemon.' What is the likely cause?
Docker Daemon is not running
Wrong Docker command
Network issue
Image not found
Q30
Q30 A container fails to start due to insufficient memory. What can you do?
Increase system memory
Use the --memory flag to allocate more memory
Rebuild the container
Stop all running containers