Chapter 4 Flashcards

1
Q

What is namespace isolation?

A

A feature of containers that ensures they only have access to the resources available to them

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

What is resource governance?

A

A feature of containers that limits their CPU, memory, network, and other resource usage

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

What are container images?

A

A collection of the specific files needed to run a program, excluding the unchanged parts of the OS

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

What are the two types of containers available in Windows Server and what are their differences?

A

Windows Server Containers operate in user mode, sharing everything with the host OS; Hyper-V containers operate on an isolated copy of the host kernel that is separated by the hypervisor, providing more security for hostile environments

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

What two components are necessary to run Windows Server Containers on Windows Server?

A

The Containers feature for running containers, and Docker for creating and managing containers

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

Where must Windows be installed to run containers?

A

On the computer’s C drive for Windows Server Containers, and anywhere for Hyper-V containers

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

What components are necessary to run Hyper-V containers?

A

The Containers feature and Hyper-V role (though the management tools are unnecessary)

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

What are the requirements to run Hyper-V containers in a Hyper-V VM?

A

Both the host and VM must run Server 2016, and the CPU must be an Intel with VT-x and Extended Page Tables (EPT) support

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

How do you enable nested virtualization?

A

Run the PowerShell cmdlet Set-VMProcessor -VMName -ExposeVirtualizationExtensions $true; then disable Dynamic Memory, set virtual processors to 2, and turn on MAC address spoofing

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

What two files are required to run Docker?

A

Dockerd.exe (the service) and Docker.exe (shell used to manage containers)

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

What are Dockerfiles?

A

Script files with instructions for creating container images

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

What is Docker Hub?

A

A cloud-based registry that enables Docker users to link to image and code repositories, as well as build and store their own images

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

What is Docker Cloud?

A

A cloud-based service to deploy containerized applications

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

How is docker installed on Windows Server?

A

Install-Module -Name dockermsftprovider -Repository psgallery -Force ; Install-Package -Name docker -Providername dockermsftprovider ; Restart-Computer -Force

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

What extra configuration is recommended for installing Docker on Nano Server?

A

Open the firewall and configure Docker to allow for management from a remote client

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

What firewall rule must be added to permit Docker client access?

A

Open port TCP 2375 for the Docker daemon

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

What setting changes where Docker images and containers are stored?

A

Set graph to c:\folder

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

What setting disables NAT in Docker?

A

Set bridge to none

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

What setting changes the permissions group for managing Docker?

A

Set group to the group name

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

What setting changes the Docker DNS server addresses?

A

Set dns to the addresses

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

How can you install the Docker PowerShell modules?

A

Register-PSRepository -Name dockerps-dev -SourceLocation https://ci.appveyor.com/nuget/docker-powershell-dev ; Install-Module docker -Repository dockerps-dev -Scope currentuser

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

How do you download a Server Core Docker image?

A

docker pull microsoft/windowsservercore

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

How can you view all the Microsoft Docker images available?

A

docker search microsoft

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

How can you download previous versions of a Docker image?

A

Use the -a parameter with the docker pull command

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

How do you tag an image with Docker?

A

Run docker tag or run docker build -t

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

What is the format of the docker tag command?

A

docker tag username/imagename:tag

27
Q

What tag is automatically applied by Docker to an untagged image?

A

latest

28
Q

What commands are used to delete a Docker image?

A

docker rmi or Remove-ContainerImage

29
Q

What command is used to delete all tagged references to the same Docker image?

A

docker rmi -f [imagename]

30
Q

How do you run a Docker container and start a PowerShell session?

A

docker run -it [imagename] powershell

31
Q

What PowerShell cmdlet is used to create a new container?

A

New-Container -ImageIdOrName [imagename] -Input -Terminal -Command powershell

32
Q

What command is used to create a Hyper-V container?

A

docker un -it –isolation=hyperv [imagename] powershell

33
Q

What is the difference in how processes are handled in Hyper-V containers versus normal containers?

A

The host OS runs the processes of normal containers, while Hyper-V containers get their own kernel

34
Q

How do you exit a PowerShell session with a container without stopping the container?

A

Press Ctrl+P or Ctrl+Q (don’t type exit)

35
Q

How can you display a list of running containers?

A

docker ps -a OR Get-Container

36
Q

How do you start a container?

A

docker start [container ID] OR Start-Container

37
Q

How do you stop a container?

A

docker stop [container ID] OR Stop-Container

38
Q

How is the computer name of a container determined?

A

By its container ID

39
Q

How do you connect to a running container?

A

docker attach [container ID] OR Enter-ContainerSession

40
Q

How do you save a container image?

A

docker commit [container ID] username/imagename:tag

41
Q

What is not saved when creating a new Docker image?

A

The base image: it must be installed before running the new image

42
Q

How are Docker containers removed?

A

docker rm [container ID] OR Remove-Container

43
Q

How are running Docker containers removed?

A

docker rm -f OR Remove-Container -Force

44
Q

What is the default NAT subnet for Docker containers?

A

172.25.112.0/20

45
Q

What is the NAT implementation used by Docker?

A

Host Network Service (HNS)

46
Q

What is the name of Docker’s configuration file?

A

daemon.json

47
Q

How do you specify an alternate NAT address in the Docker config file?

A

fixed-cidr

48
Q

How do you prevent Docker from creating any network configuration?

A

Set bridge to none

49
Q

How do you specify port mapping in Docker?

A

Use the option -p external:internal

50
Q

How do you create a public-facing network in Docker?

A

docker network create -d transpartent [network name]

51
Q

How do you view networks in Docker?

A

docker network ls

52
Q

How do you set a static IP in Docker?

A

Use the –subnet and –gateway options when creating the network and use the –ip and –dns options when running the container

53
Q

How do you create a data volume in Docker?

A

When running the container, use the option -v [file path]

54
Q

Where are container volumes stored by default on a host?

A

C:\ProgramData\docker\volumes

55
Q

How do you specify a source folder when creating a Docker volume?

A

Use the option -v [source path]:[dest path]

56
Q

How do you create a read-only container volume?

A

Use the option -v [file path]:ro

57
Q

How do you add a container volume to a running container?

A

You can’t. You must save the existing container as an image then relaunch it with the -v switch

58
Q

How do you create a Docker container that runs in the background instead of interactively?

A

Use the -d option instead of the -it option

59
Q

What are the three types of container names used by Docker?

A

Long UUID, short UUID, and a random name

60
Q

What is the recommended way to create a Docker image?

A

Write a dockerfile and use docker build to create the image

61
Q

Where are Docker images stored by default?

A

DockerHub

62
Q

How can you find images on DockerHub?

A

Use the command docker search

63
Q

What Azure service allows for running containers in the cloud?

A

Azure Container Service (ACS)