Docker Flashcards

1
Q

A container is a runtime instance of an i_._.

A

A container is a runtime instance of an image

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

A c________ is a runtime instance of an image

A

A container is a runtime instance of an image

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

C________s package software into standardized units

A

Containers package software into standardized units

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

H________s are software that manages physical resources on a server

A

Hypervisors are software that manages physical resources on a server

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

The major benefit of containers is that you can ship and run applications everywhere because containers b________ everything that the application needs to run.

A

The major benefit of containers is that you can ship and run applications everywhere because containers bundle everything that the application needs to run.

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

The docker d_____ is a process running in the background that is responsible for managing containers, images, networks, and volumes.

A

The docker daemon is a process running in the background that is responsible for managing containers, images, networks, and volumes.

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

The docker clients (docker desktop or docker CLI) communicate with the docker d_____ to perform actions on or with containers.

A

The docker clients (docker desktop or docker CLI) communicate with the docker daemon to perform actions on or with containers.

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

Docker images can be stored in r________s in the cloud via DockerHub

A

Docker images can be stored in registries in the cloud via DockerHub

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

When a container is launched, it gets one final layer called the w________ layer that is used for local storage

A

When a container is launched, it gets one final layer called the writable layer that is used for local storage

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

When two containers are launched from the same image, this w________ layer is what distinguishes them from one another.

A

When two containers are launched from the same image, this writable layer is what distinguishes them from one another.

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

The writable layer is not p________ and is lost between starts and stops.

A

The writable layer is not persistent and is lost between starts and stops.

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

docker images are r____-only and i________able

A

docker images are read-only and immutable

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

Docker supports a temporary filesystem called t____s, which is stored in memory (RAM)

A

Docker supports a temporary filesystem called tmpfs which is stored in memory (RAM)

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

B____ m____ maps a host folder to a container folder, allowing the container to access files on the host.

A

Bind mount maps a host folder to a container folder, allowing the container to access files on the host.

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

V_____s are persistent storage that are managed by docker but utilize the host machine. They allow you to create persistence storage that exists outside of the lifecycle of an individual container.

A

Volumes are persistent storage that are managed by docker but utilize the host machine. They allow you to create persistence storage that exists outside of the lifecycle of an individual container.

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

Containers on the same b____ network can communicate with one another but can’t be reached from outside the docker host without port publishing.

A

Containers on the same bridge network can communicate with one another but can’t be reached from outside the docker host without port publishing.

17
Q

P____ p____ing maps a host port to a container port on the bridge network. This allows requests made to the host port to access the container port and the running process within it.

A

Port publishing maps a host port to a container port on the bridge network. This allows requests made to the host port to access the container port and the running process within it.

18
Q

by utilizing a b_____ network, multiple containers can share the same port number. However, to make them accessible from outside the internal network, the port must be mapped to unique and unused ports on the host machine.

A

by utilizing a bridge network, multiple containers can share the same port number. However, to make them accessible from outside the internal network, the port must be mapped to unique and unused ports on the host machine.

19
Q

C____s can be connected to a bridge network. Each container gets a unique, private __ address on this network. Each container can use the same p___ because the IP is unique

A

Containers can be connected to bridge network
Each container gets a unique, private IP address on this network. Each container can use the same port because the IP is unique

20
Q

By using bridge networking and publishing containers, we can publish the same container to different host p____s

A

By using bridge networking and publishing containers, we can publish the same container to different host ports

21
Q

I___ is pre-cooked, frozen treat.
C____ is the delicious treat.

A

Image is pre-cooked, frozen treat.
Container is the delicious treat.

22
Q

the Docker engine will take care of turning the immutable files called i____s into c_____s.

A

the Docker engine will take care of turning the immutable files called images into containers.

23
Q

If we do not specify a W_____, we risk overwriting important files by accident

A

If we do not specify a WORKDIR, we risk overwriting important files by accident

24
Q

This is a critical thing to keep in mind when we build our images. It’s best to do most things, such as to run npm install during the build process i_____ the container rather than doing those prior to building.

A

This is a critical thing to keep in mind when we build our images. It’s best to do most things, such as to run npm install during the build process inside the container rather than doing those prior to building.

(Instead of using npm install, npm offers a much better tool for installing dependencies, the ci command)

25
Q

Instead of using npm install, npm offers a much better tool for installing dependencies, the __ command.

A

Instead of using npm install, npm offers a much better tool for installing dependencies, the ci command.

26
Q

Differences between ci and install:

install may update the package-lock.json
install may install a different version of a dependency if you have ^ or ~ in the version of the dependency.
ci will d____ the node_modules folder before installing anything
ci will follow the package-lock.json and does not alter any files
So in short: ci creates reliable b____s, while install is the one to use when you want to install new d_________s.

A

Differences between ci and install:

install may update the package-lock.json
install may install a different version of a dependency if you have ^ or ~ in the version of the dependency.
ci will delete the node_modules folder before installing anything
ci will follow the package-lock.json and does not alter any files
So in short: ci creates reliable builds, while install is the one to use when you want to install new dependencies.

27
Q

As we are not installing anything new during the b____ step, and we don’t want the v_____s to suddenly change, we will use ci

A

As we are not installing anything new during the build step, and we don’t want the versions to suddenly change, we will use ci

28
Q

we can use npm ci –o___=d___ to not waste time installing development dependencies.

A

we can use npm ci –omit=dev to not waste time installing development dependencies.

29
Q

There are 2 rules of thumb you should follow when creating images:

Try to create as s____ of an image as possible
Try to create as s____ of an image as possible

A

There are 2 rules of thumb you should follow when creating images:

Try to create as secure of an image as possible
Try to create as small of an image as possible

30
Q

Don’t run containers as r____

A

Don’t run containers as root

31
Q

Use e_____ and d_______ Docker base image tags

A

Use explicit and deterministic Docker base image tags

32
Q

Bind mount is the act of binding a file (or directory) on the h___ machine to a file (or directory) in the c______

A

Bind mount is the act of binding a file (or directory) on the host machine to a file (or directory) in the container

33
Q

The Docker command e____ is a heavy hitter. It can be used to jump right into a container when it’s running.

A

The Docker command exec is a heavy hitter. It can be used to jump right into a container when it’s running.

34
Q

There are actually _ different forms for CMD, out of which the e___ form is preferred.

A

There are actually three different forms for CMD, out of which the exec form is preferred.

35
Q

During build the flag -_ will be used to tell which file to use, it would otherwise default to Dockerfile

A

During build the flag -f will be used to tell which file to use, it would otherwise default to Dockerfile

36
Q

B_____ is a small executable with multiple tools and is called “The Swiss Army Knife of Embedded Linux”

A

Busybox is a small executable with multiple tools and is called “The Swiss Army Knife of Embedded Linux”