Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Docker-Compose Quiz (Basics)

Total questions: 7

Worksheet time: 4mins

Name
Class
Date
1.

What is the purpose of Docker Compose?

a)

To define and manage multi-container applications

b)

To create single-container applications

c)

To monitor CPU usage of containers

d)

To automate Docker installation

2.

What does the version field specify in a Docker Compose file?

a)

The version of the Docker engine

b)

The version of the Docker Compose syntax being used

c)

The version of the web server

d)

The version of the operating system

3.

What is the purpose of mounting a volume in a Docker Compose service?

a)

To increase container performance

b)

To persist data even if the container is stopped or removed

c)

To limit network traffic

d)

To reduce container size

4.

How can you start the services defined in a Docker Compose file?

a)

docker-compose up

b)

docker run services

c)

docker start services

d)

docker-compose start

5.

What does the -d option do when running docker-compose up?

a)

Displays detailed logs of the services

b)

Stops the services immediately

c)

Starts the services in the background

d)

Restarts the services automatically

6.

How can you stop the application and remove the containers in Docker Compose?

a)

Use docker stop command

b)

Delete the docker-compose.yml file

c)

Press Ctrl + C in the terminal and run docker-compose down

d)

Restart the host machine

7.

What is the role of a Dockerfile in Docker Compose?

a)

To define the services in the application

b)

To manage Docker volumes

c)

To monitor network traffic

d)

To automate Docker installation