Questions:
What is Docker primarily used for?
a) Virtualizing hardware
b) Containerizing applications
c) Managing databases
d) Writing software code
Which component runs containers and manages Docker objects?
a) Docker CLI
b) Docker Engine
c) Docker Hub
d) Docker Compose
What is a Docker image?
a) A running container
b) A read-only template for creating containers
c) A volume for data persistence
d) A network configuration
What command downloads an image from Docker Hub?
a) docker run
b) docker pull
c) docker build
d) docker start
Which command lists currently running containers?
a) docker ps
b) docker ls
c) docker images
d) docker status
What is the primary difference between Docker containers and Virtual Machines?
a) Containers share the host OS kernel, VMs run separate OS
b) VMs are faster to start
c) Containers require more storage space
d) VMs share the host OS kernel
Which Docker component provides a cloud-based registry for images?
a) Docker CLI
b) Docker Daemon
c) Docker Hub
d) Dockerfile
How do you access a running container’s shell?
a) docker shell
b) docker run -it
c) docker exec -it <container_id> sh
d) docker start
Which command stops a running container?
a) docker kill
b) docker stop
c) docker pause
d) docker remove
What file contains instructions to build a Docker image?
a) Dockerfile
b) docker-compose.yml
c) Dockerimage
d) Containerfile
What command removes a Docker image?
a) docker rmi
b) docker rm
c) docker remove-image
d) docker delete
Which Docker object is used to persist data beyond container lifecycle?
a) Network
b) Volume
c) Image
d) Container
docker pull
docker ps
docker exec -it <container_id> sh
docker stop
docker rmi