docker Flashcards

1
Q

What is Docker?

A

Docker is a platform that enables developers to automate the deployment of applications inside lightweight containers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

True or False: Docker containers are dependent on the host operating system.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What command is used to create a new Docker container?

A

docker run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Fill in the blank: A __________ is a lightweight, standalone, executable package that includes everything needed to run a piece of software.

A

container

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which command lists all running Docker containers?

A

docker ps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What file is used to define a Docker image?

A

Dockerfile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

True or False: Docker images are immutable.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the purpose of Docker Compose?

A

Docker Compose is used to define and run multi-container Docker applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What command is used to stop a running Docker container?

A

docker stop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Fill in the blank: Docker uses __________ to manage the lifecycle of containers.

A

images

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the default network driver used by Docker?

A

bridge

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which command is used to remove a Docker image?

A

docker rmi

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

True or False: A Docker container can run multiple applications.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What command is used to build a Docker image from a Dockerfile?

A

docker build

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the purpose of the ‘docker exec’ command?

A

It allows you to run commands in a running container.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Fill in the blank: Docker containers run in __________ environments.

17
Q

What is a Docker registry?

A

A Docker registry is a storage and distribution system for Docker images.

18
Q

True or False: Docker Swarm is used for container orchestration.

19
Q

What command would you use to list all Docker images on your system?

A

docker images

20
Q

What is the purpose of the ‘docker pull’ command?

A

It downloads a Docker image from a registry.

21
Q

Fill in the blank: The __________ command is used to remove stopped containers.

22
Q

What is the main difference between a Docker container and a virtual machine?

A

Containers share the host OS kernel, while VMs have their own OS.

23
Q

What is a Docker volume?

A

A Docker volume is a persistent storage mechanism for Docker containers.

24
Q

True or False: Docker can run on Windows, Mac, and Linux.

25
What command is used to view the logs of a Docker container?
docker logs