Chapter 4 - Implement Windows Containers Flashcards
You are the administrator for your company network. You have a Windows Server 2016 Hyper-V server named Server1. Server1 has an IP address of 192.168.1.78 and has a container named Container1 that hosts a web application on port 84. Container1 has
an IP address of 172.16.5.6 and a port mapping from port 80 on Server1 to port 84 on Container1. You have a server named Server2 that has an IP address of 192.168.1.79. To what IP address and port should you connect if you need to connect to the web application from Server2?
A. 192.168.1.78:84
B. 192.168.1.78:80
C. 172.16.5.6:80
D. 172.16.5.6:84
C. You would want to connect to Container1, since that is where the web application is located. Container1 has an IP address of 172.16.5.6 and a port mapping from port 80.
You are the administrator for your company network. You have a Windows Server 2016 Hyper-V host named Server1. Server1 has a virtual machine named VM1 that is configured to run the Docker daemon. On VM1 you have a container network that uses transparent mode. What should you do if you need to ensure that containers that run on VM1 can obtain IP addresses from DHCP?
A. Run docker network connect on Server1.
B. Run docker network connect on VM1.
C. Run Get-VMNetworkAdapter-VMName VM1| Set-VMNetworkAdapter- MacAddressSpoofing On on VM1.
D. Run Get-VMNetworkAdapter-VMName VM1| Set-VMNetworkAdapter- MacAddressSpoofing On on Server1.
D. You will want to configure Media Access Control (MAC) address spoofing on Server1. If your container host is virtualized, you must enable MAC address spoofing.
You are the administrator for your company network. You have a Windows Server 2016 server named Server1 and you install the Docker daemon. What should you do if you need to configure the Docker daemon to accept connections only on TCP port 64500? A. Edit the daemon.json file. B. Edit the configuration JSON file. C. Run the New-NetFirewallRule cmdlet. D. Run the Set-Service cmdle
A. Administrators can set any configuration option for the daemon in a JSON format. This would be the daemon.json file. By default, Docker captures the standard output (and standard error) of all your containers and writes them in files using the JSON format. The default file location is C:\ProgramData\docker\config\daemon.json.
You are the administrator for your company network. You have a Windows Server 2016 server named Server1. You plan to deploy Internet Information Services (IIS) in a Windows container. What three actions should you perform if you need to prepare Server1 for the planned deployment? (Choose three.) A. Install the Hyper-V Server role. B. Install the Base Container images. C. Install the Container feature. D. Install the Web Server role. E. Install Docker.
B, C, and E. In order, first you would install the Container feature, then install Docker, and then install the Base Container images.
You are the administrator for your company network. You are discussing container types with a colleague. Which container type provides application isolation through process and namespace isolation technology and shares a kernel with the container host and all containers running on the host?
A. Hyper-V Container
B. Windows Server Container C. Docker Container
D. Docker Daemon Container
B. In a Windows Server Container, the kernel is shared among all the different Windows Containers. This container allows the administrator to isolate applications so that applica- tions can run in their own space and not affect other applications.
You are the administrator for your company network. You have a Windows Server 2016 server named Server1 that runs the Docker daemon. What should you do if you need to ensure that members of a security group named Docker Administrators can administer Docker?
A. Run the sc privs command.
B. Edit the daemon.json file.
C. Add Docker Administrators to the local Administrators group.
D. Edit the configuration.json file.
C. Docker can only be administered by an administrator. So, by creating a Docker Admin- istrators group and adding it to the local Administrators group, you allow the Docker Administrators group to administer Docker.
You are the administrator for your company network. You have a Windows Server 2016 container host named Server1. What parameter should you use with the docker run command if you need to start a Hyper-V Container on Server1?
A. ––entrypoint B. ––expose
C. ––runtime
D. ––isolation E. ––privileged
D. When you are working with Hyper-V Containers in Docker, the settings are identical to managing Windows Server containers. The one difference that you want to include in the Hyper-V Container is the –isolation=hyperv parameter. The following is
an example of the Docker command with the Hyper-V parameters: docker run -it –isolation=hyperv microsoft/nanoserver cmd.
You are the administrator for your company network. You have a Windows Server 2016 container host named Server1. On Server1, you create a container named Container1. What should you run if you need to mount C:\ContainerFiles from Server1 to Container1?
A. dockerd ––storage-opt dm.mountopt=ContainerFiles Container1
B. docker run -it -vC:\ContainerFiles:c:\ContainerFiles Container1 C. dockerd ––storage-opt dm.datadev=/c/ContainerFiles Container1 D. docker run -it -v c:\ContainerFiles Container1
B. The docker run command is used with the -v switch to mount a folder to a container.
You are the administrator for your company network. You have a Windows Server 2016 server named Server1 that has the Containers feature installed. You create a text file that contains the commands that will be used to automate the creation of new containers. What should you name the file if you need to ensure that the commands in the text file are used when you create new containers?
A. Bootstrap.ini B. Config.ini
C. Dockerfile
D. Unattend.txt
C. A Dockerfile is a text document that contains all the commands a user could call on the
command line to assemble an image.
You are the administrator for your company network. You have a Windows Server 2016 Nano Server named Nano1. You deploy several containers to Nano1 that use an image named Image1. What should you run if you need to deploy a new container to Nano1 that uses Image1? A. The docker run command B. The docker load command C. Install-NanoServerPackage cmdlet D. Install-WindowsFeature cmdlet
A. The docker run command executes commands in a Dockerfile and also allows you to delete an image.
You are the administrator for your company network. You are having a discussion with a colleague regarding the use of Docker and Windows Containers. Which of the following statements is true?
A. The Docker application does not need to be installed to work with Windows Containers.
B. The Docker application does need to be installed to work with Windows Containers. C. Neither needs to be installed; they are both already installed by default.
D. Each operates separately and they do not work together.
B. The Docker application does need to be installed in order to work with Windows Containers.
You are the administrator for your company network. You are discussing the Docker Restart Policy with a colleague. What is the default setting for a container when working with the Docker Restart Policy?
A. always
B. on-failure[:max-retries] C. no
D. unless-stopped
C. The default setting for a container is no. This setting will not automatically restart the
container.
You are the administrator for your company network. One of the advantages of using Docker is that you can go to Docker’s website to look at the different images that are avail- able. There are images for operating systems, applications, and software. But what happens if you can’t find an image that meets your needs?
A. You must find the image template that best matches your needs.
B. Just create your own Dockerfile.
C. Just pick the image template that most closely resembles what you are looking for. D. There is nothing you can do.
B. You can build your own images using Dockerfiles. When you install Docker, the Docker engine includes tools that can be used to create Dockerfiles. Dockerfiles are just text files that are manually created and they are compiled and turned into image files.
You are the administrator for your company network. You and a colleague are discussing how Windows Containers differ from Hyper-V Containers. Which statement is true?
A. There are no differences.
B. Windows Containers utilize their own instance of the Windows kernel and Hyper-V
Containers share the system’s kernel between all containers and the host.
C. Windows Containers utilize their own instance of the Windows kernel and Hyper-V Containers utilize the system’s kernel on just the host.
D. Windows Containers share the system’s kernel between all containers and the host and Hyper-V Containers utilize their own instance of the Windows kernel.
D. Windows Containers share the system’s kernel between all containers and the host. Hyper-V Containers are different because each Hyper-V Container utilizes its own instance of the Windows kernel.
You are the administrator for your company network. You and a colleague are discussing
the Azure Container Service and what it can be used for. Which statement is true?
A. The Azure Container Service uses proprietary scheduling and management tools. B. The Azure Container Service uses open source scheduling and management tools. C. The Azure Container Service uses commercial scheduling and management tools. D. The Azure Container Service uses registered scheduling and management tools.
B. The Azure Container Service allows you to easily create, configure, and manage your virtual machine cluster of containers. By using open source tools, the Azure Container Service connects you with thousands of other users who are also designing, building, and maintaining container images.
You are the administrator for your company network. You want to view the information about containers. What PowerShell cmdlet will allow you to view that information?
A. Get-ContainerHost
B. Get-ContainerNetworkAdapter C. Get-ContainerImage
D. Get-Container
D. The Get-Container PowerShell cmdlet allows an administrator to view information about containers.
You are the administrator for your company network. You are discussing Dockerfile commands with a colleague. What Dockerfile command allows you to create a mount point and externally mounted volumes from host systems or other containers?
A. Volume B. Onbuild C. Expose D. Run
A. The Volume Dockerfile command allows an administrator to create a mount point and externally mounted volumes from host systems or other containers.
You are the network administrator for your company network. The company has decided to start using containers. What command would you use to create a new container?
A. docker build container B. docker create
C. docker new
D. docker build
B. The docker create command gives you the ability to create a new container.
You are the network administrator for your company network. The company has decided to start using containers. You have created some images. Now you’d like to see the images you created. What command allows you to see your images?
A. docker see
B. docker images C. docker info D. docker view
B. The docker images command gives you the ability to see your images. The docker info command allows you to see how many images you have on a host, but it does not give you details about the images.
You are the network administrator for your company network. The company has decided to start using containers. You need to build and use a Dockerfile. What command would you use if you need to compile and create an image using the Dockerfile?
A. docker build B. docker run
C. docker compile D. docker rm
A. The docker build command allows you to compile and create an image. The docker run command executes commands in a Dockerfile, and the docker rm command allows you to delete an image.
You are the network administrator for your company network. The company has decided to start using containers. You need to build and use a Dockerfile. What command would you use if you need to execute commands within the Dockerfile?
A. docker build B. docker run
C. docker compile D. docker rm
B. The docker run command executes commands in a Dockerfile. The docker build command allows you to compile and create an image, and the docker rm command allows you to delete an image.
You are the network administrator for your company network. The company has decided to start using containers. You need to build and use a Dockerfile. What command would you use if you need to delete a container?
A. docker delete
B. docker kill container C. delete-docker-Container D. remove-container
D. The remove-container command gives you the ability to delete a container.
You are the network administrator for your company network. The company has decided to start using containers. You need to build a new image using Windows Server Core. What command would you use to get a Windows Server Core image?
A. docker get microsoft/windowsservercore B. docker run microsoft/windowsservercore C. docker pull microsoft/windowsservercore D. docker build microsoft/windowsservercore
C. The docker pull microsoft/windowsservercore command allows you to grab an
image of Windows Server Core from the Docker website.
You are the administrator for your company network. The company has decided to start using containers. Your supervisor wants to know which client operating systems can host containers. Which of the following client operating systems do you tell him? (Choose all
that apply.)
A. Windows 7 Professional
B. Windows 8.1 Enterprise
C. Windows 10 Home
D. Windows 10 Enterprise (Anniversary Update)
E. Windows Server 2016
D and E. Computer systems (physical or virtual machines) running Windows Server 2016 (Core and with Desktop Experience), Nano Server, or Windows 10 Professional and Enter- prise (Anniversary Update) allow you to set up containers.
You are the administrator for your company network. The network contains an Active Directory domain. The domain contains a Windows Server 2016 server named Server1. Server1 allows inbound connectivity from all computers in the domain. Server1 has an IP address of 192.168.0.10 and hosts a Windows container named Container1. Container1 hosts a website that is accessible on port 80. You need to ensure that you can use the Docker client to manage Container1 from any computer in the domain. What four cmdlets should you run? (Choose four.)
A. Restart-Service docker
B. New-ContainerNetwork- Name nat1 -Mode NAT-SubnetPrefix 192.168.0.0/24
-GatewayAddress 192.168.0.10
C. Add-Content ‘c:\programdata\docker\config\daemon.json’ ‘{“hosts”: [“tcp://127.0.0.1:80”, “npipe://”]}’
D. Add-Content ‘c”\programdata\docker\config\daemon.json’ ‘{“hosts”: [tcp://0.0.0.0:2375”, npipe://” ] }’]
E. New-Item-Type File c:\programData\docker\config\daemon.json
A, B, D, and E. In order, that’s E, D, A, and B. First thing you’d want to do is create a New-Item, then Add-Content, then restart the Docker service, and then create the New-ContainerNetwork.
You are the administrator for your company network. The network has a main office and three branch offices and consists of an Active Directory domain. The main office contains three domain controllers and each branch office has one domain controller. You discover that the new settings in the Default Domain Policy are not applied in one of the branch offices, but all other Group Policy Objects (GPOs) are applied. What should you do from a domain controller in the main office if you need to check the replication of the Default Domain Policy for the branch office?
A. From Group Policy Management, click Default Domain Policy and then open the Details tab.
B. From Group Policy Management, click Default Domain Policy and then open the Scope tab.
C. Run repadmin.exe from a command prompt.
D. Run dcdiag.exe from a command prompt
C. repadmin.exe is a Replication Diagnostics tool. This command-line tool assists administrators in diagnosing replication problems between Windows domain controllers. repadmin.exe can also be used for monitoring the relative health of an Active Directory forest.
You are the administrator for your company network. You and a colleague are discussing Windows Containers. Which of the following statements is true regarding Windows Containers?
A. They are independent and isolated environments that run an operating system.
B. They are independent and isolated environments that support user Home Folders.
C. They are dependent and non-isolated environments that run an operating system.
D. They are dependent and non-isolated environments that support user Home Folders.
A. Windows Containers are independent and isolated environments that run an operating system. These isolated environments allow an administrator to place an application into its own container, thus not affecting any other applications or containers.
You are the administrator for your company network. You are discussing container types with a colleague. Which container type runs within a virtual machine, and the container host’s kernel is not shared between the other containers? A. Hyper-V Container B. Windows Server Container C. Docker Container D. Docker Daemon Container
A. Hyper-V Containers run within a virtual machine, and the Windows Containers don’t need to run in a Hyper-V environment. In a Hyper-V Container, the container host’s kernel is not shared between the other Hyper-V Containers.
You are the administrator for your company network. You are discussing Container components with a colleague. Which component can be on a physical or virtual machine, and is configured with the Windows Container feature?
A. Container Image
B. Container Host
C. Container OS Image D. Container Registry
B. The Container Host component can be on a physical or virtual machine, and it’s con- figured with the Windows Container feature. So the Windows Container sits on top of the Container Host.
You are the administrator for your company network. You are discussing Container components with a colleague. Which component contains all of the layers of the container?
A. Container Image
B. Container Host
C. Container OS Image D. Container Registry
A. Container Image is the component that contains all of the layers of the container. So the Container Image contains the operating system, the application, and all of the services required to make that application function properly.
You are the administrator for your company network. You are discussing Container components with a colleague. Your colleague is telling you about the component that runs the Docker application. What is this component called? A. Container Registry B. Docker daemon C. Dockerfile D. Docker Hub repositories
B. The Docker daemon is the component that runs the Docker application. The Docker daemon is automatically installed after you complete the installation of the Docker applica- tion. If you need to configure the Docker daemon, you would use the Docker daemon file. This file is in a JSON format.
You are the administrator of your company network. You are planning on using containers on a virtualized network. You currently have the Hyper-V role installed on the system
and have the Windows Server 2016 operating system installed. You are concerned that
you might not have enough RAM. What is the minimum amount of RAM required to run containers in a virtualized network?
A. 2 GB B. 4 GB C. 6 GB D. 8 GB
B. A minimum of 4 GB of RAM needs to be available to the virtualized Hyper-V host.
You are the administrator for your company network. The company has decided to start using containers. You want to see what version of Windows you have installed because you know that the operating system on the host machine must match the operating system of the Windows Container. What is one tool can you use to see what version of Windows is currently installed on the host machine?
A. repadmin.exe B. dcdiag.exe C. regedit.exe D. perfmon.exe
C. To see what Windows version you have installed, enter the system’s registry
(regedit.exe) and do a search for the current version.
You are the administrator for your company network. The company has decided to install Docker. Which of the following statements regarding Docker are true? (Choose all that apply.)
A. It is a software package that allows you to create and manipulate containers and images.
B. It is a hardware package that allows you to create and manipulate containers and images.
C. It is a third-party application that Microsoft uses for containers.
D. It consists of a Docker engine and a Docker client (Docker daemon).
A, C, and D. Docker is the software package that you install and the Docker daemon is the application that you use to do your configuration and management. After you install Docker, the Docker daemon is automatically installed and configured with default settings. Docker is a third-party application that Microsoft has started using for containers. The Docker application consists of a Docker engine and a Docker client (Docker daemon).