Docker Flashcards

(19 cards)

1
Q

Define Docker.

A

A platform for developing, shipping, and running applications in containers.

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

What is a container?

A

A lightweight, standalone, executable package that includes everything needed to run a piece of software.

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

True or false: Docker images are mutable.

A

FALSE

Docker images are immutable; changes create new images.

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

Fill in the blank: A Dockerfile is a _______ for building Docker images.

A

script

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

What command is used to build a Docker image?

A

docker build

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

Define Docker Hub.

A

A cloud-based registry for sharing and managing Docker images.

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

What does the command docker run do?

A

It creates and starts a container from a specified image.

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

True or false: Volumes are used to persist data in Docker.

A

TRUE

Volumes allow data to persist beyond the lifecycle of a container.

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

What is the purpose of docker-compose?

A

To define and run multi-container Docker applications using a YAML file.

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

Fill in the blank: Docker Swarm is a _______ for managing a cluster of Docker engines.

A

orchestration tool

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

What command lists all running containers?

A

docker ps

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

Define Dockerfile instruction: FROM.

A

Specifies the base image to use for the Docker image.

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

What does the CMD instruction do in a Dockerfile?

A

Specifies the default command to run when a container starts.

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

True or false: Docker networks allow containers to communicate with each other.

A

TRUE

Networks provide isolation and communication between containers.

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

What is the purpose of the ENTRYPOINT instruction?

A

To configure a container to run as an executable.

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

Fill in the blank: Docker Compose files use _______ syntax.

17
Q

What command stops a running Docker container?

18
Q

Define image layers.

A

Layers are the building blocks of Docker images, allowing for efficient storage and reuse.

19
Q

What does docker pull do?

A

Downloads a Docker image from a registry to your local machine.