Chapter 12 - Managing Containers - Do I know this Already? Flashcards
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.
d. It allocates a pseudo TTY connected to the container.
What PowerShell command deletes a container?
a. Delete-Container
b. Remove-Container
c. Erase-Container
d. Scrub-Container
b. Remove-Container
Which of the following is not an option for a container network driver?
a. NAT
b. L2 Tunnel
c. Transparent
d. L2 NAT
d. L2 NAT
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. It permits DHCP IP address assignment by enabling MAC address spoofing.
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.
c. The volume is not deleted.
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
b. -cpuset-mems
What is the Docker Daemon?
The actual running Docker engine on a container host.
What is the Windows Container Stack?
Networking components that permit container network access.
What is Dockerfile?
Instructions and statements for each instruction that create a Docker image.
What is DockerHub?
A public repository for storing and sharing Docker images.
What is Azure Container Services (ACS)?
Clustered virtual machines for running container- based applications
What Docker daemon command permits you to see a list of all the running containers on a host?
docker ps -a
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?
Transparent
What memory parameter used with docker run permits you to specify the memory a container can use?
-m
What four networking options are available for Managing Containers?
- Network Address Translation
- Transparent
- L2 Bridge
- L2 Tunnel
What is Network Address Translation relating to containers?
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.
How does the Transparent option of Networking when managing containers work?
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.
How does an L2 bridge help Networking with Container management?
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.
How does the L2 tunnel work with Networking and managing containers?
Microsoft reserves this mode for Microsoft Cloud Stack.
How do you create a Docker NAT network using a specific prefix?
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.
How do you create data volumes on a container?
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.
How do you create data volumes on a container in PowerShell ?
docker run -it -v c:\datafolder microsoft/windowsservercore powershell
How do you use docker build to create a new image in a container?
docker build -t dhcp .
Manage Container Images Using DockerHub Repository for Public and
Private Scenarios