WorksheetsDocker Quiz
Total questions: 30
Worksheet time: 15mins
What is Docker primarily used for?
To package and run applications in isolated environments
To create websites
To design graphics
To edit videos
Which command is used to start the Docker daemon?
docker -d
docker start
docker run
docker info
What is Docker Hub?
A service for finding and sharing container images
A tool for editing images
A website for downloading software
A platform for creating videos
Which command is used to list all Docker images?
docker images
docker list
docker ps
docker info
What does the command "docker rmi
Deletes an image
Lists all images
Starts a container
Stops a container
Which command is used to pull an image from Docker Hub?
docker pull
docker push
docker run
docker start
What is a container in Docker?
A runtime instance of a Docker image
A file storage system
A programming language
A type of database
Which command is used to run a container in the background?
docker run -d
docker start
docker exec
docker ps
What does the command "docker ps" do?
Lists currently running containers
Deletes a container
Starts a container
Stops a container
Which command is used to inspect a container?
docker inspect
docker ps
docker run
docker start
What does the command "docker container stats" display?
Resource usage statistics
List of all containers
Logs of a container
Running containers
Which command is used to remove unused images?
docker image prune
docker rmi
docker ps
docker run
What is the purpose of the command "docker exec -it
Opens a shell inside a running container
Starts a container
Stops a container
Deletes a container
Which command is used to publish a container's port(s) to the host?
docker run -p
docker start
docker ps
docker exec
What does the command "docker logs -f
Fetches and follows the logs of a container
Starts a container
Stops a container
Deletes a container
Which command is used to remove a stopped container?
docker rm
docker start
docker ps
docker exec
What is the purpose of the command "docker start|stop
Starts or stops an existing container
Deletes a container
Lists all containers
Opens a shell inside a container
Which command is used to build an image from a Dockerfile without the cache?
docker build -t
docker build -t
docker run
docker ps
What does the command "docker info" display?
System-wide information
List of all containers
Logs of a container
Running containers
Which command is used to create and run a container from an image with a custom name?
docker run --name
docker start
docker ps
docker exec
What is the purpose of the command "docker search
Searches for an image on Docker Hub
Deletes an image
Starts a container
Stops a container
Which command is used to publish an image to Docker Hub?
docker push
docker pull
docker run
docker start
What does the command "docker container stats" display?
Resource usage statistics
List of all containers
Logs of a container
Running containers
Which command is used to login into Docker Hub?
docker login
docker pull
docker push
docker run
What is the purpose of the command "docker container stats"?
Displays resource usage statistics
Lists all containers
Deletes a container
Starts a container
Which command is used to list all Docker containers (running and stopped)?
docker ps --all
docker ps
docker start
docker stop
What does the command "docker rm
Removes a stopped container
Starts a container
Stops a container
Deletes an image
Which command is used to run a container with a custom name?
docker run --name
docker start
docker ps
docker exec
What is the purpose of the command "docker exec -it
Opens a shell inside a running container
Starts a container
Stops a container
Deletes a container
Which command is used to remove unused images?
docker image prune
docker rmi
docker ps
docker run
