True or false: If a container is removed, data stored only in its writable layer may be lost.
3 Containers and Containerization Online Quiz Questions
Use this free practice quiz with 20 questions to review 3 Containers and Containerization, test your knowledge, and prepare for your next test or exam.
True or false: Container isolation is an infallible security boundary, so host security and configuration do not matter.
- A
True
- B
False
In the Docker command docker run -p 8080:80 nginx:latest, which host port is mapped to port 80 in the container?
What kind of service stores and distributes container images?
Complete each sentence with the appropriate term: An is the packaged template used to create an application environment. A is an instance created from that template.
Complete each sentence with the appropriate term: A human-readable image version label is a . A identifies particular image content more precisely.
A host already has an application image. Which task belongs to the container runtime when the host starts the application?
- A
It stores and distributes images.
- B
It configures a container's isolated environment and starts its application process.
- C
It provides a guest operating system and kernel for every container.
- D
It assigns a permanent version label to every image.
A deployment must refer to particular image content as precisely as possible. Which image identifier is the best choice?
- A
A tag, because it cannot be reassigned.
- B
A tag, because it always identifies identical image content.
- C
A digest, because it identifies particular image content more precisely.
- D
Either one, because both guarantee the publisher is trustworthy.
Which statement correctly compares the kernel arrangements of a typical container and a virtual machine?
- A
A container boots its own guest operating system, while a VM shares the host kernel.
- B
A container generally shares the host kernel, while a VM has a guest operating system and its own kernel.
- C
Both a container and a VM always share the host kernel.
- D
Both a container and a VM always run a separate guest operating system.
Select all statements that correctly describe container registries and a typical image-distribution workflow.
- A
A typical workflow can build an image, push it to a registry, and have a host pull it.
- B
A registry is the process that starts the application inside a container.
- C
A registry contains repositories, and repositories contain images.
- D
Images in repositories can be identified by tags or digests.
Select all statements that correctly describe typical differences between containers and virtual machines.
- A
Containers generally share the host kernel.
- B
Each container normally runs a full guest operating system with its own kernel.
- C
Containers are usually quicker to start and more resource-efficient than full VMs.
- D
Containers always provide a stronger isolation boundary than VMs.
A team is choosing between containers and virtual machines for application workloads. Explain why containers are generally quicker to start and more resource-efficient, and describe one trade-off or limitation compared with VMs.
A developer wants to run Linux containers on a macOS host. Which setup is commonly used to provide the compatible kernel?
- A
They always run directly on the Windows or macOS kernel.
- B
They are commonly run inside a Linux VM managed by the container software.
- C
They must each include a complete Linux guest operating system.
- D
They can run only if the computer is itself a cloud VM.
A team runs its web application and database in separate containers. What is a practical benefit of this design?
- A
They must share one runtime state.
- B
They can be started, stopped, updated, and scaled independently.
- C
They no longer require a host operating system.
- D
They automatically provide a stronger security boundary than a virtual machine.
What example of separate persistent storage is given for data that should not be lost when a container is removed?
An application running in a container modifies a file. What happens to the image from which the container was created?
- A
The image changes to include every runtime modification.
- B
The image is deleted when the container stops.
- C
Runtime changes go into a separate writable layer, while the image remains unchanged.
- D
The container creates a new guest operating system for each change.
What components of container images can be reused when building or downloading related images?
A deployment needs to select the same image content reliably over time. Which approach best addresses the fact that image tags can be reassigned?
- A
Use the tag alone, because tags cannot be reassigned.
- B
Use the image name alone, because familiar names prove trustworthiness.
- C
Use any tag, because it always selects the same image.
- D
Use a digest when you need to identify particular image content more precisely.
Which sequence describes a typical workflow for making a built image available to a host that will run it?
- A
Build the image, push it to a registry, then have the host pull it before starting a container.
- B
Push the running container to a registry, then build an image on the host.
- C
Start a container first, then use the registry to install a guest operating system.
- D
Store the image only in the host's writable layer, then pull it from the registry.
True or false: Because containers isolate processes, their security boundary can be treated as infallible regardless of configuration or host security.
- A
True
- B
False