Chapter 12 - Managing Containers - Do I know this Already? Flashcards

1
Q

What does the -it switch do with the docker run command?

a. It exports the container.
b. It runs the container with resource management settings.
c. It runs the container in the context of an IT administrator.
d. It allocates a pseudo TTY connected to the container.

A

d. It allocates a pseudo TTY connected to the container.

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

What PowerShell command deletes a container?

a. Delete-Container
b. Remove-Container
c. Erase-Container
d. Scrub-Container

A

b. Remove-Container

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

Which of the following is not an option for a container network driver?

a. NAT
b. L2 Tunnel
c. Transparent
d. L2 NAT

A

d. L2 NAT

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

What does the following PowerShell cmdlet accomplish?
Get-VMNetworkAdapter - VMName ContainerHostVM | Set-VMNetworkAdapter - MacAddressSpoofing On

a. It permits DHCP IP address assignment by enabling MAC address spoofing.
b. It permits firewalling by enabling MAC address spoofing.
c. It permits NAT by enabling MAC address spoofing.
d. It permits virtual networking by enabling MAC address spoofing.

A

a. It permits DHCP IP address assignment by enabling MAC address spoofing.

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

You delete a container that is using a volume on the container host. Which statement is true?

a. You cannot delete the container if it has a linked volume.
b. The volume is also deleted if it is empty.
c. The volume is not deleted.
d. The volume is always deleted.

A

c. The volume is not deleted.

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

Which resource control switch specifies the nodes on a NUMA host that a container can use?

a. -cpu-shares
b. -cpuset-mems
c. -cpuset-cpus
d. -c

A

b. -cpuset-mems

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

What is the Docker Daemon?

A

The actual running Docker engine on a container host.

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

What is the Windows Container Stack?

A

Networking components that permit container network access.

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

What is Dockerfile?

A

Instructions and statements for each instruction that create a Docker image.

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

What is DockerHub?

A

A public repository for storing and sharing Docker images.

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

What is Azure Container Services (ACS)?

A

Clustered virtual machines for running container- based applications

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

What Docker daemon command permits you to see a list of all the running containers on a host?

A

docker ps -a

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

What type of container networking configuration permits the container endpoint to connect directly to the physical network and permits static or dynamic IP address assignment?

A

Transparent

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

What memory parameter used with docker run permits you to specify the memory a container can use?

A

-m

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

What four networking options are available for Managing Containers?

A
  • Network Address Translation
  • Transparent
  • L2 Bridge
  • L2 Tunnel
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Network Address Translation relating to containers?

A

Each container receives an IP address from an internal, private IP prefix (such as 172.16.0.0/12); this supports port forwarding/mapping from the container host to container endpoints.

17
Q

How does the Transparent option of Networking when managing containers work?

A

Each container endpoint connects directly to the physical network. You can assign IPs from the physical network statically or dynamically, using an external DHCP server.

18
Q

How does an L2 bridge help Networking with Container management?

A

Each container endpoint is in the same subnet as the container host. IP addresses must be assigned statically from the same prefix as the container host; all container endpoints on the host have the same MAC address due to Layer 2 address translation.

19
Q

How does the L2 tunnel work with Networking and managing containers?

A

Microsoft reserves this mode for Microsoft Cloud Stack.

20
Q

How do you create a Docker NAT network using a specific prefix?

A

You can change one or two options in the Docker daemon.json file:

  • Use the fixed-cidr:/Mask option, which creates the default NAT network with the IP prefix and match specified.
  • Use the bridge:none option, which does not create a default network; you create a user-defined network with any driver by using the Docker network create -d command.
  • Before performing any of the configuration options in this section, stop the Docker service and delete any preexisting NAT networks.
21
Q

How do you create data volumes on a container?

A

Step 1. Use docker commit to save to a new image any changes to the existing container.
Step 2. Use docker run to create a new container from the new image. Step 3. Use the -v switch to add the data volume.

22
Q

How do you create data volumes on a container in PowerShell ?

A

docker run -it -v c:\datafolder microsoft/windowsservercore powershell

23
Q

How do you use docker build to create a new image in a container?

A

docker build -t dhcp .
Manage Container Images Using DockerHub Repository for Public and
Private Scenarios