Chapter 4 Flashcards

(63 cards)

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
How do you tag an image with Docker?
Run docker tag or run docker build -t
26
What is the format of the docker tag command?
docker tag username/imagename:tag
27
What tag is automatically applied by Docker to an untagged image?
latest
28
What commands are used to delete a Docker image?
docker rmi or Remove-ContainerImage
29
What command is used to delete all tagged references to the same Docker image?
docker rmi -f [imagename]
30
How do you run a Docker container and start a PowerShell session?
docker run -it [imagename] powershell
31
What PowerShell cmdlet is used to create a new container?
New-Container -ImageIdOrName [imagename] -Input -Terminal -Command powershell
32
What command is used to create a Hyper-V container?
docker un -it --isolation=hyperv [imagename] powershell
33
What is the difference in how processes are handled in Hyper-V containers versus normal containers?
The host OS runs the processes of normal containers, while Hyper-V containers get their own kernel
34
How do you exit a PowerShell session with a container without stopping the container?
Press Ctrl+P or Ctrl+Q (don't type exit)
35
How can you display a list of running containers?
docker ps -a OR Get-Container
36
How do you start a container?
docker start [container ID] OR Start-Container
37
How do you stop a container?
docker stop [container ID] OR Stop-Container
38
How is the computer name of a container determined?
By its container ID
39
How do you connect to a running container?
docker attach [container ID] OR Enter-ContainerSession
40
How do you save a container image?
docker commit [container ID] username/imagename:tag
41
What is not saved when creating a new Docker image?
The base image: it must be installed before running the new image
42
How are Docker containers removed?
docker rm [container ID] OR Remove-Container
43
How are running Docker containers removed?
docker rm -f OR Remove-Container -Force
44
What is the default NAT subnet for Docker containers?
172.25.112.0/20
45
What is the NAT implementation used by Docker?
Host Network Service (HNS)
46
What is the name of Docker's configuration file?
daemon.json
47
How do you specify an alternate NAT address in the Docker config file?
fixed-cidr
48
How do you prevent Docker from creating any network configuration?
Set bridge to none
49
How do you specify port mapping in Docker?
Use the option -p external:internal
50
How do you create a public-facing network in Docker?
docker network create -d transpartent [network name]
51
How do you view networks in Docker?
docker network ls
52
How do you set a static IP in Docker?
Use the --subnet and --gateway options when creating the network and use the --ip and --dns options when running the container
53
How do you create a data volume in Docker?
When running the container, use the option -v [file path]
54
Where are container volumes stored by default on a host?
C:\ProgramData\docker\volumes
55
How do you specify a source folder when creating a Docker volume?
Use the option -v [source path]:[dest path]
56
How do you create a read-only container volume?
Use the option -v [file path]:ro
57
How do you add a container volume to a running container?
You can't. You must save the existing container as an image then relaunch it with the -v switch
58
How do you create a Docker container that runs in the background instead of interactively?
Use the -d option instead of the -it option
59
What are the three types of container names used by Docker?
Long UUID, short UUID, and a random name
60
What is the recommended way to create a Docker image?
Write a dockerfile and use docker build to create the image
61
Where are Docker images stored by default?
DockerHub
62
How can you find images on DockerHub?
Use the command docker search
63
What Azure service allows for running containers in the cloud?
Azure Container Service (ACS)