Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Docker Quiz

Total questions: 30

Worksheet time: 15mins

Name
Class
Date
1.

What is Docker primarily used for?

a)

To package and run applications in isolated environments

b)

To create websites

c)

To design graphics

d)

To edit videos

2.

Which command is used to start the Docker daemon?

a)

docker -d

b)

docker start

c)

docker run

d)

docker info

3.

What is Docker Hub?

a)

A service for finding and sharing container images

b)

A tool for editing images

c)

A website for downloading software

d)

A platform for creating videos

4.

Which command is used to list all Docker images?

a)

docker images

b)

docker list

c)

docker ps

d)

docker info

5.

What does the command "docker rmi " do?

a)

Deletes an image

b)

Lists all images

c)

Starts a container

d)

Stops a container

6.

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

a)

docker pull

b)

docker push

c)

docker run

d)

docker start

7.

What is a container in Docker?

a)

A runtime instance of a Docker image

b)

A file storage system

c)

A programming language

d)

A type of database

8.

Which command is used to run a container in the background?

a)

docker run -d

b)

docker start

c)

docker exec

d)

docker ps

9.

What does the command "docker ps" do?

a)

Lists currently running containers

b)

Deletes a container

c)

Starts a container

d)

Stops a container

10.

Which command is used to inspect a container?

a)

docker inspect

b)

docker ps

c)

docker run

d)

docker start

11.

What does the command "docker container stats" display?

a)

Resource usage statistics

b)

List of all containers

c)

Logs of a container

d)

Running containers

12.

Which command is used to remove unused images?

a)

docker image prune

b)

docker rmi

c)

docker ps

d)

docker run

13.

What is the purpose of the command "docker exec -it sh"?

a)

Opens a shell inside a running container

b)

Starts a container

c)

Stops a container

d)

Deletes a container

14.

Which command is used to publish a container's port(s) to the host?

a)

docker run -p :

b)

docker start

c)

docker ps

d)

docker exec

15.

What does the command "docker logs -f " do?

a)

Fetches and follows the logs of a container

b)

Starts a container

c)

Stops a container

d)

Deletes a container

16.

Which command is used to remove a stopped container?

a)

docker rm

b)

docker start

c)

docker ps

d)

docker exec

17.

What is the purpose of the command "docker start|stop "?

a)

Starts or stops an existing container

b)

Deletes a container

c)

Lists all containers

d)

Opens a shell inside a container

18.

Which command is used to build an image from a Dockerfile without the cache?

a)

docker build -t --no-cache

b)

docker build -t

c)

docker run

d)

docker ps

19.

What does the command "docker info" display?

a)

System-wide information

b)

List of all containers

c)

Logs of a container

d)

Running containers

20.

Which command is used to create and run a container from an image with a custom name?

a)

docker run --name

b)

docker start

c)

docker ps

d)

docker exec

21.

What is the purpose of the command "docker search "?

a)

Searches for an image on Docker Hub

b)

Deletes an image

c)

Starts a container

d)

Stops a container

22.

Which command is used to publish an image to Docker Hub?

a)

docker push /

b)

docker pull

c)

docker run

d)

docker start

23.

What does the command "docker container stats" display?

a)

Resource usage statistics

b)

List of all containers

c)

Logs of a container

d)

Running containers

24.

Which command is used to login into Docker Hub?

a)

docker login

b)

docker pull

c)

docker push

d)

docker run

25.

What is the purpose of the command "docker container stats"?

a)

Displays resource usage statistics

b)

Lists all containers

c)

Deletes a container

d)

Starts a container

26.

Which command is used to list all Docker containers (running and stopped)?

a)

docker ps --all

b)

docker ps

c)

docker start

d)

docker stop

27.

What does the command "docker rm " do?

a)

Removes a stopped container

b)

Starts a container

c)

Stops a container

d)

Deletes an image

28.

Which command is used to run a container with a custom name?

a)

docker run --name

b)

docker start

c)

docker ps

d)

docker exec

29.

What is the purpose of the command "docker exec -it sh"?

a)

Opens a shell inside a running container

b)

Starts a container

c)

Stops a container

d)

Deletes a container

30.

Which command is used to remove unused images?

a)

docker image prune

b)

docker rmi

c)

docker ps

d)

docker run