General Docker I
1.
How can you stop a running Docker container?
docker kill
docker pause
docker stop
docker end
2.
What is the purpose of the Docker image layers?
To organize Docker images
To optimize image caching and reusability
To create Docker networks
To manage Docker volumes
3.
How can you list all running Docker containers?
docker status
docker list
docker show
docker ps
4.
How can you remove all Docker containers at once?
docker clear
docker purge
docker remove all
docker rm -f $(docker ps -aq)
5.
How can you create a Docker volume?
docker make volume
docker create volume
docker add volume
docker volume create
6.
What is Docker?
A programming language
A virtualization platform
An operating system
A containerization platform
7.
What is the purpose of a Dockerfile?
To create Docker networks
To run Docker containers
To manage Docker volumes
To build Docker images
8.
What is the default networking mode in Docker?
Bridge
Host
Overlay
None
9.
What is the purpose of the Docker Compose tool?
To build Docker images
To manage Docker networks
To define and run multi-container Docker applications
To monitor Docker containers
10.
What is the Docker registry used for?
To store Docker images
To manage Docker containers
To create Docker networks
To build Docker images
11.
How can you specify the port mapping while running a Docker container?
--port
-P
--expose
-p
12.
What is the purpose of the ENTRYPOINT instruction in a Dockerfile?
To set environment variables
To define the base image
To specify the working directory
To configure the primary command to run when the container starts
13.
What is Docker Swarm used for?
To build Docker images
To manage Docker networks
To orchestrate and manage a cluster of Docker nodes
To create Docker volumes
14.
What is the purpose of the HEALTHCHECK instruction in a Dockerfile?
To specify health-related environment variables
To define the health status of a Docker container
To configure network health
To manage Docker volumes health
15.
What is the purpose of the .dockerignore file?
To exclude files and directories from the Docker build context
To specify Docker image layers
To configure Docker networking
To set Docker environment variables
16.
Which command is used to build a Docker image?
docker create
docker build
docker start
docker run
17.
Which Docker command is used to remove a Docker container?
docker remove
docker delete
docker erase
docker rm
18.
Which Docker command is used to view the logs of a Docker container?
docker trace
docker info
docker status
docker logs
19.
Which Docker command is used to tag a Docker image?
docker tag
docker label
docker mark
docker flag
20.
How can you check the version of Docker installed on your system?
docker version
docker info
docker --version
docker show version