Containers Flashcards

(13 cards)

1
Q

What is a container?

A

A process running on a machine that’s isolated from all other processes on that machine.

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

What is a container image?

A

It’s an isolated filesystem + some container configuration.

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

What is a container named volume?

A

It is a mount point managed by Docker that allows data to persist in a container.

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

What is the difference between a named volume and a bind mount?

A

A named volume is mostly managed by Docker and the main use case is data storage.

A bind mount is managed by the developer and the main use case is mounting the source code on the container to see how the application (on the container) reacts to source code changes in real time.

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

Does the single-responsibility principle hold for containers?

A

YES. One container should run one process.

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

What is container networking?

A

It’s the ONLY process that allows two containers to communicate.

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

What is the command to build an image?

A

docker build

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

What is the name of the file that specifies the details of the image?

A

Dockerfile

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

What is the command to run a container?

A

docker run

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

What is the command to show the active containers?

A

docker ps

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

What is the command to show the available images?

A

docker image ls

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

What is the command to create a containers network?

A

docker network create <network-name></network-name>

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