Courseiva

CCNA Container Virtualization Questions

75 of 80 questions · Page 1/2 · Container Virtualization topic · Answers revealed

1
Multi-Selecthard

Which TWO of the following are true regarding the differences between rkt (Rocket) and Docker?

Select 2 answers
A.rkt only supported binary images
B.Docker is a sub-project of rkt
C.Docker never had a daemon
D.rkt utilized a daemonless architecture
E.rkt natively supported Kubernetes Pods
AnswersD, E

rkt was designed to run without a persistent system-wide daemon.

Why this answer

rkt focused on pods and a daemonless architecture, whereas Docker initially used a centralized daemon.

2
MCQmedium

In systemd-nspawn, how can you execute a command inside a container that is already running?

A.systemctl start
B.systemd-nspawn -run
C.machinectl shell
D.nsenter
AnswerC

This allows interacting with a running machine.

Why this answer

'machinectl shell' is the command used to spawn a shell inside a running container.

3
MCQhard

In a FreeBSD Jail, how can you ensure the jail starts automatically at boot?

A.Set jail_enable=YES in /etc/rc.conf
B.Create a symlink in /etc/init.d
C.Use systemd
D.Add a cron job
AnswerA

This enables the jail service.

Why this answer

Setting 'jail_enable="YES"' in /etc/rc.conf is required for the jails subsystem to start.

4
MCQmedium

Which Docker network driver should you use if you want containers to have their own IP addresses on the physical network, as if they were physically connected to the network?

A.bridge
B.overlay
C.ipvlan
D.macvlan
AnswerD

This bridges the container to the host's physical network.

Why this answer

The 'macvlan' driver allows containers to be assigned a MAC address and IP on the physical network.

5
MCQeasy

When building a Dockerfile, which instruction should be used to define the user context for subsequent RUN, CMD, and ENTRYPOINT instructions?

A.USER
B.WORKDIR
C.RUN useradd
D.AS
AnswerA

This command effectively switches the security context.

Why this answer

The USER instruction sets the UID/GID for processes executed in subsequent steps.

6
MCQhard

When configuring a systemd-nspawn container, what is the effect of the --private-network option?

A.It isolates the container's network from the host
B.It forces the container to use a bridge
C.It disables network encryption
D.It restricts access to localhost
E.It prevents the container from starting
AnswerA

This creates a private network namespace for the container.

Why this answer

The --private-network flag creates a virtual network namespace for the container, ensuring it cannot access the host's network interfaces.

7
MCQmedium

A Docker container running a web server is unable to serve traffic on port 8080. You verify the Dockerfile exposes port 80. What is the correct way to map this for external access?

A.docker run -p 80:8080
B.docker run -p 8080:80
C.docker run --net host
D.docker run --expose 8080
E.docker run -P 8080
AnswerB

This maps host port 8080 to container port 80.

Why this answer

The -p flag in docker run is used to map host ports to container ports.

8
MCQmedium

You are running a Docker container and need to map port 8080 on the host to port 80 in the container. Which command argument should you use?

A.-p 80:8080
B.-p 8080:80
C.--port 8080:80
D.--map 8080:80
AnswerB

Correct mapping format.

Why this answer

The -p flag (or --publish) defines port mapping.

9
MCQmedium

Which Dockerfile instruction is used to copy a file from the host file system into the image?

A.RUN
B.ADD
C.PUSH
D.COPY
E.IMPORT
AnswerD

COPY transfers files from the host to the image.

Why this answer

The COPY instruction is the standard way to move files from the build context into the image.

10
Multi-Selectmedium

Which THREE instructions in a Dockerfile can modify the image's filesystem?

Select 3 answers
A.ADD
B.ENV
C.EXPOSE
D.RUN
E.COPY
AnswersA, D, E

Adds files or URLs to the image.

Why this answer

RUN, COPY, and ADD all add or modify content within the image layers.

11
MCQmedium

You are configuring LXC and want to set a CPU limit for a container. Which cgroup parameter is used to specify the quota of CPU time in microseconds?

A.lxc.cgroup.cpu.limit
B.lxc.cgroup.cpu.cfs_quota_us
C.lxc.cgroup.cpu.shares
D.lxc.cgroup.cpu.period_us
AnswerB

This defines the hard CPU limit in microseconds.

Why this answer

lxc.cgroup.cpu.cfs_quota_us defines the number of microseconds the container can run in a period.

12
Multi-Selecthard

Which THREE networking modes are natively supported by Docker?

Select 3 answers
A.bridge
C.tunnel
D.none
E.host
AnswersA, D, E

Default for standalone containers.

Why this answer

Bridge, host, and none are standard Docker network drivers.

13
Multi-Selecthard

Which THREE features are provided by Linux Namespaces in the context of containers?

Select 3 answers
A.CPU scheduling
B.Disk quotas
C.PID isolation
D.Network isolation
E.Mount isolation
AnswersC, D, E

Separates process trees.

Why this answer

Namespaces provide isolation for Process IDs, Networking, and Mount points.

14
MCQmedium

Which kernel feature provides the isolation necessary for namespaces in container virtualization?

A.OverlayFS
B.Seccomp
C.Namespaces
D.Cgroups
E.AppArmor
AnswerC

Namespaces are the primary mechanism for process isolation.

Why this answer

Namespaces are a Linux kernel feature that partition kernel resources, such as PID, network, and mount points.

15
MCQeasy

What does the 'docker rm' command do?

A.Renames a container
B.Stops a container
C.Removes an image
D.Removes a container
AnswerD

Correct for container removal.

Why this answer

'docker rm' deletes one or more stopped containers.

16
MCQmedium

A Docker container is failing to connect to an external database despite the host being able to ping it. You suspect a bridge networking issue. Which command allows you to inspect the current NAT rules created by Docker?

A.docker network inspect bridge
B.iptables -t nat -L -n
C.ip link show docker0
D.sysctl -a | grep net.bridge
AnswerB

Docker adds rules to the NAT table for port forwarding and masquerading.

Why this answer

Docker manages iptables rules for container networking.

17
MCQmedium

Which file is primarily responsible for defining the configuration and environment variables for an OpenVZ container?

A./etc/openvz/config
B./var/lib/vz/config
C./etc/vz/container.conf
D./etc/vz/vz.conf
E./etc/vz/conf/CTID.conf
AnswerE

The CTID.conf file contains all parameters for the specific container ID.

Why this answer

In OpenVZ, containers are managed via configuration files located in /etc/vz/conf/.

18
MCQhard

You are using systemd-nspawn. How do you create an image of a container to be used as a template?

A.tar -cvf
B.docker export
C.lxc-copy
D.machinectl export-tar
AnswerD

This exports the container to a tar archive.

Why this answer

'machinectl export-tar' is used to export a systemd-nspawn container (machine) to a tarball.

19
MCQmedium

What is the primary function of a Docker Registry?

A.To store and distribute images
B.To build images
C.To run containers
D.To manage networking
AnswerA

Registries act as a central repository for images.

Why this answer

A registry stores and distributes Docker images.

20
MCQhard

When using systemd-nspawn, you want to limit the memory usage of a container to 512MB. Which flag should be passed to the systemd-nspawn command?

A.--max-mem=512M
B.--memory-limit=512M
C.--cgroup-memory=512M
D.--limit-mem=512M
AnswerB

This flag correctly limits the container memory usage.

Why this answer

systemd-nspawn uses the --memory-limit flag to restrict the memory consumption of the spawned container.

21
MCQmedium

When using 'docker-compose', which file format is used to define the services?

A.YAML
B.INI
C.XML
AnswerA

Compose files are written in YAML.

Why this answer

Docker Compose uses YAML files.

22
MCQmedium

When using Docker volumes, which type of mount should you use if you want the data to persist on the host filesystem at a specific, user-defined path?

A.Named volume
B.Anonymous volume
C.Bind mount
D.Tmpfs mount
AnswerC

This allows mounting a specific host directory.

Why this answer

Bind mounts allow mapping a specific host path to a container path, providing persistence at a known location.

23
MCQhard

You are troubleshooting a container networking issue. You notice that traffic from the container is not being SNATed. What should you check in the iptables rules?

A.nat table, PREROUTING chain
B.nat table, POSTROUTING chain
C.filter table, FORWARD chain
D.mangle table, OUTPUT chain
AnswerB

MASQUERADE rules are added here to handle SNAT.

Why this answer

The POSTROUTING chain in the nat table is responsible for MASQUERADE rules used for SNAT.

24
MCQeasy

Which command is used to remove an unused Docker image?

A.docker rm
B.docker image delete
C.docker prune image
D.docker rmi
AnswerD

This removes images.

Why this answer

'docker rmi' is the command to remove an image.

25
Multi-Selectmedium

Which TWO of the following are valid container orchestration platforms?

Select 2 answers
A.Nginx
B.Kubernetes
C.Docker Desktop
D.Nomad
E.GitLab
AnswersB, D

The industry standard orchestrator.

Why this answer

Kubernetes and HashiCorp Nomad are widely used orchestration platforms.

26
Multi-Selectmedium

Which TWO commands are used to manage images in Docker?

Select 2 answers
A.docker tag
B.docker run
C.docker create
D.docker attach
E.docker build
AnswersA, E

Labels an image.

Why this answer

'docker build' creates images, and 'docker tag' renames/labels them.

27
Multi-Selecthard

Which THREE storage drivers are supported by Docker?

Select 3 answers
A.devicemapper
B.xfs
C.aufs
D.ext4
E.overlay2
AnswersA, C, E

Older, block-device-based driver.

Why this answer

Overlay2, devicemapper, and aufs are well-known Docker storage drivers.

28
MCQeasy

What is the main advantage of using a container over a virtual machine?

A.Ability to run different kernels
B.Stronger security isolation
C.No network configuration
D.Lighter weight and faster startup
AnswerD

Shared kernel enables efficiency.

Why this answer

Containers share the host kernel, making them significantly lighter and faster to start than VMs.

29
MCQmedium

You need to inspect the metadata of a specific Docker image without pulling it from a remote registry. Which command should you use?

A.docker pull --metadata
B.docker image history
C.docker manifest inspect
D.docker image inspect
AnswerC

This retrieves metadata directly from the registry.

Why this answer

docker manifest inspect allows retrieving information about an image's manifest without downloading the layers.

30
MCQmedium

You are debugging a Docker image buildup that fails at the 'RUN' instruction due to missing network access during the build. What command option should be checked if the build environment uses a proxy?

A.--proxy
B.--build-arg
C.--privileged
D.--network=host
E.--env-file
AnswerB

Passes environment variables to the docker build process.

Why this answer

Docker builds do not automatically inherit environment variables from the host's shell unless specified via --build-arg.

31
MCQmedium

You are using BSD Jails and need to start a jail. Which utility is the standard management tool for jail administration?

A.jexec
B.jail
C.jails-admin
D.jail-manage
E.jls
AnswerB

The jail command is the base utility for jail management.

Why this answer

jail is the command to create or start a jail, and jailctl is also sometimes used in managed environments, but jexec is used for executing commands inside.

32
MCQmedium

You need to inspect the configuration of an LXC container named 'web'. Which command should you use?

A.lxc-info -n web
B.lxc-check
C.lxc-ls
D.lxc-config
AnswerA

Displays status and configuration info for 'web'.

Why this answer

'lxc-info -n web' displays information about the specified container.

33
Multi-Selecthard

Which THREE items are typically included in an OpenVZ configuration file?

Select 3 answers
A.BIOS settings
B.User Beancounters (resource limits)
C.OS template reference
D.Networking parameters
E.Kernel source code
AnswersB, C, D

UBC define resource constraints for the container.

Why this answer

OpenVZ configs contain networking definitions, resource limits (UBC), and OS template references.

34
MCQhard

You are troubleshooting a problem where an LXC container cannot access its own /dev/null. What is a common cause in a non-root container?

A.Missing mknod permission
B.Wrong kernel version
C.Host kernel panic
D.Insufficient RAM
AnswerA

Containers often need to be able to create nodes if they aren't provided by default.

Why this answer

Lack of device node creation in the container's /dev directory or improper cgroup permissions often causes this.

35
MCQmedium

You are configuring an LXC container and need to grant it access to a specific host character device without running the container in privileged mode. Which configuration option in the container's config file should you use?

A.lxc.cgroup2.devices.allow
B.lxc.cap.keep
C.lxc.mount.entry
D.lxc.hook.pre-start
AnswerA

This allows the container to access the specified device node.

Why this answer

The lxc.cgroup2.devices.allow directive is the standard way to whitelist specific hardware devices for a container in cgroup2-based environments.

36
MCQmedium

You are using a BSD Jail and want to limit the filesystem access of the jail to a specific directory tree. Which utility or configuration mechanism is primarily used to achieve this?

A.mount -t nullfs
B.jail_root_dir
C.chroot
D.jail.conf path parameter
AnswerD

This defines the directory tree the jail is restricted to.

Why this answer

The 'path' configuration parameter in the jail.conf file defines the root directory of the jail.

37
MCQhard

In a Docker swarm, which mode of service publishing allows incoming traffic to be load-balanced across all healthy container replicas?

A.macvlan
B.ingress
C.overlay
D.host
AnswerB

This enables the routing mesh for load balancing.

Why this answer

The 'ingress' network mode in Swarm allows external traffic to hit any node and be routed to a container via the routing mesh.

38
MCQeasy

Which command lists all Docker images currently on the host?

A.docker ps
B.docker show
C.docker images
D.docker list
AnswerC

This lists local images.

Why this answer

'docker images' or 'docker image ls' lists images.

39
MCQhard

When cleaning up Docker resources, which command will remove all stopped containers, unused networks, and dangling images in one step?

A.docker container prune
B.docker volume prune
C.docker image prune -a
D.docker cleanup
E.docker system prune
AnswerE

This command cleans up the entire environment of unused resources.

Why this answer

docker system prune removes all unused data, which is the most efficient cleanup method.

40
MCQhard

You are using an overlay network in Docker Swarm. What is the standard protocol used for the control plane and data plane communication between nodes?

A.BGP
C.GRE
D.VXLAN
AnswerD

This is the encapsulation protocol for Docker overlay.

Why this answer

VXLAN is the standard encapsulation protocol used by Docker overlay networks.

41
MCQmedium

You need to limit the amount of CPU shares a Docker container can utilize. Which flag should be used?

A.--cpu-limit
B.--cpus
C.--max-cpu
D.--cpu-shares
E.--cpu-weight
AnswerD

This allows setting a relative weight for CPU access.

Why this answer

The --cpu-shares flag sets the relative CPU weight of a container.

42
MCQeasy

Which Docker command is used to display the resource usage (CPU, memory) of running containers?

A.docker stats
B.docker top
C.docker usage
D.docker info
AnswerA

This displays the live resource consumption.

Why this answer

'docker stats' provides a real-time stream of container resource usage statistics.

43
MCQhard

When configuring a Docker volume that needs to be shared between multiple containers, which storage driver storage path is recommended to ensure persistent data availability if the host reboots?

A.-v /host/path:/container/path
B.--link
C.--tmpfs
D.--volume-driver=none
E.--memory
AnswerA

Bind mounts provide persistent access to host filesystems.

Why this answer

Using a named volume or a bind mount to a host directory ensures persistence beyond the container lifecycle.

44
Multi-Selecthard

Which THREE configuration items can be managed by LXC cgroups?

Select 3 answers
A.CPU shares
B.User permissions
C.Device access
D.Memory limits
E.DNS settings
AnswersA, C, D

Controls CPU priority.

Why this answer

Cgroups manage memory, CPU, and device access.

45
Multi-Selecthard

You are optimizing a Dockerfile to reduce image size. Which THREE of the following practices are recommended?

Select 3 answers
A.Use the FROM latest tag for all base images
B.Always install recommended packages for security
C.Remove /var/lib/apt/lists/* after installing packages
D.Use multi-stage builds to discard build-time dependencies
E.Use a single RUN command to chain multiple commands with &&
AnswersC, D, E

Cleaning the package cache reduces image size significantly.

Why this answer

Multi-stage builds, minimizing layers, and cleaning up caches are standard practices.

46
MCQmedium

In the context of container orchestration, what is the role of a 'sidecar' container?

A.To provide auxiliary services like logging or monitoring for the main container
B.To act as a load balancer for the cluster
C.To store persistent data for the primary container
D.To run in a separate network namespace
E.To replace the main container when it crashes
AnswerA

Sidecars are commonly used for logging, proxies, or configuration synchronization.

Why this answer

A sidecar container runs alongside the main application container within the same pod to extend or enhance its functionality.

47
MCQhard

You are debugging a Docker network issue where containers on different hosts cannot communicate. Which network driver is specifically designed to support multi-host overlay networking?

A.bridge
B.macvlan
C.ipvlan
D.host
E.overlay
AnswerE

The overlay driver enables multi-host container connectivity.

Why this answer

The 'overlay' driver in Docker creates a distributed network among multiple Docker daemon hosts.

48
MCQeasy

Which command-line tool is primarily used to inspect the metadata and configuration of a running Docker container?

A.docker ps
B.docker stats
C.docker info
D.docker inspect
E.docker describe
AnswerD

This command returns the configuration and state of the object.

Why this answer

docker inspect provides detailed information on containers and images in JSON format.

49
Multi-Selectmedium

Which THREE of the following are components of the Docker architecture?

Select 3 answers
A.Docker Daemon
B.Docker Kernel
C.Docker Client
D.Docker GUI
E.Docker Registry
AnswersA, C, E

The core engine managing objects.

Why this answer

Docker client, daemon, and registry are the three core components.

50
MCQmedium

Which command allows you to enter an existing running container and execute a new command inside it?

A.docker exec
B.docker commit
C.docker attach
D.docker run
AnswerA

This starts a new process in the target container.

Why this answer

'docker exec' is the standard command to run a new process in a running container.

51
Multi-Selectmedium

Which TWO types of namespaces are commonly used to achieve container isolation in Linux?

Select 2 answers
A.GPU
B.Network
C.CPU
D.PID
E.Kernel
AnswersB, D

Network namespaces isolate the network stack.

Why this answer

Network and PID namespaces are fundamental for containerization.

52
MCQhard

You are building a multi-stage Dockerfile and want to copy a binary from the 'builder' stage to the final stage. Which syntax is correct?

A.ADD --from=builder /bin/app /bin/app
B.COPY --from=builder /bin/app /bin/app
C.COPY builder:/bin/app /bin/app
D.COPY --stage=builder /bin/app /bin/app
AnswerB

This correctly copies the file from the named builder stage.

Why this answer

'COPY --from=stage_name source destination' is the syntax for multi-stage copying.

53
MCQmedium

You are migrating a legacy application to an LXC container and need to ensure the container has access to the host's /dev/sda block device. Which configuration key must be added to the container's configuration file?

A.lxc.mount.device = /dev/sda
B.lxc.cap.sys_admin = 1
C.lxc.cgroup.devices.allow = b 8:0 rwm
D.lxc.dev.access = /dev/sda
AnswerC

This allows the container to access block device 8:0, which corresponds to /dev/sda.

Why this answer

To allow a container to access host devices, the lxc.cgroup.devices.allow and lxc.mount.entry must be configured properly in the container config.

54
Multi-Selecthard

Which THREE of the following are valid storage driver options for Docker on Linux?

Select 3 answers
A.overlay2
B.ext4-driver
C.vfs
D.zfs
E.btrfs
AnswersA, D, E

The recommended storage driver for most Linux distributions.

Why this answer

Docker supports multiple storage drivers including overlay2, btrfs, and zfs, depending on the underlying filesystem.

55
MCQeasy

Which command-line option is used to run a Docker container in the background (detached mode)?

A.-i
B.--bg
C.-d
D.-b
E.-t
AnswerC

The -d flag enables detached mode.

Why this answer

The -d flag specifies that the container should run in the background.

56
MCQmedium

You are managing an LXC container and need to create a snapshot of the container's root file system. Which command achieves this?

A.lxc-snapshot -n container_name
B.lxc-checkpoint -n container_name
C.lxc-copy -s container_name
D.lxc-backup
E.lxc-clone --snapshot
AnswerA

This creates a snapshot for the specified container.

Why this answer

The lxc-snapshot tool is the standard method for managing LXC container snapshots.

57
MCQhard

In an OpenVZ environment, you need to limit the number of processes a container can create. Which parameter in the container configuration file should be modified?

A.PHYSPAGES
B.NUMPROC
C.KMEMSIZE
D.PRIVVMPAGES
AnswerB

This specifically limits the number of processes.

Why this answer

The 'nproc' (or numproc) parameter in the OpenVZ configuration limits the total number of processes a container is allowed to hold.

58
MCQhard

In systemd-nspawn, how do you specify a different root directory for the container?

A.--path
B.--root
C.-D
D.-r
AnswerC

Specifies the root directory.

Why this answer

The -D or --directory flag specifies the root path.

59
MCQeasy

What is the primary difference between a container image and a container instance?

A.Images are stored in RAM, instances are on disk
B.The image is the template; the instance is the running process
C.Instances cannot be stopped
D.The instance is the template; the image is the running process
E.They are the same thing
AnswerB

Images are immutable blueprints; containers are the operational runtime.

Why this answer

A container image is a read-only template, whereas a container instance is a writable, running version of that image.

60
Multi-Selectmedium

Which THREE commands are used to manage the lifecycle of an LXC container?

Select 3 answers
A.lxc-start
B.lxc-destroy
C.lxc-pause
D.lxc-reboot
E.lxc-stop
AnswersA, B, E

Starts the container.

Why this answer

lxc-start, lxc-stop, and lxc-destroy are standard commands for managing container states.

61
MCQeasy

What is the primary function of the ENTRYPOINT instruction in a Dockerfile?

A.Setting environment variables
B.Defining volume mount points
C.Configuring the executable that runs when the container starts
D.Specifying metadata
E.Installing software packages
AnswerC

ENTRYPOINT is designed to make the container behave like an executable.

Why this answer

ENTRYPOINT sets the main command that will execute when the container starts.

62
Multi-Selectmedium

Which TWO items are typically included in a Docker context?

Select 2 answers
A.The host kernel
B.Remote images
C.Running containers
D.Local files in the build directory
E.Dockerfile
AnswersD, E

Source code and artifacts to be copied into the image.

Why this answer

The Docker context includes the Dockerfile and the build directory contents.

63
MCQeasy

How do you view the logs of a running container?

A.docker logs [container]
B.docker show-logs
C.cat /var/lib/docker/logs
D.docker log
AnswerA

This retrieves the container's stdout/stderr.

Why this answer

'docker logs' is the command to retrieve logs.

64
MCQmedium

Which instruction in a Dockerfile is best suited for installing packages to minimize image size?

A.COPY apt-cache /
B.CMD apt-get install package
C.RUN apt-get update && apt-get install -y package
D.RUN apt-get update && apt-get install -y package && rm -rf /var/lib/apt/lists/*
AnswerD

This cleans the apt cache, reducing the layer size.

Why this answer

Combining the update and install commands with 'rm -rf /var/lib/apt/lists/*' in a single RUN command prevents layer bloat.

65
Multi-Selectmedium

Which TWO commands are valid for inspecting container network settings?

Select 2 answers
A.docker inspect
B.docker show net
C.docker net status
D.docker list network
E.docker network inspect
AnswersA, E

Displays detailed container info including networking.

Why this answer

'docker inspect' provides detailed JSON, and 'docker network inspect' shows network-specific details.

66
MCQmedium

What is the purpose of the 'rkt' (Rocket) container runtime?

A.To replace the kernel
B.To run pods in a secure, pluggable manner
C.To manage cloud infrastructure
D.To provide a GUI for Docker
AnswerB

rkt focused on security, standards, and pod-native execution.

Why this answer

rkt was designed as a pod-native container engine with a focus on security and composability.

67
MCQeasy

Which command shows the history of layers in a Docker image?

A.docker history
B.docker log
C.docker layers
D.docker image info
AnswerA

This is the correct command.

Why this answer

'docker image history' displays the layers and the commands that created them.

68
MCQhard

You are using Docker and want to create a volume that is shared between multiple containers and persists even if the containers are deleted. What is the best approach?

A.Anonymous volume
B.Tmpfs
C.Bind mount
D.Named volume
AnswerD

Managed by Docker and designed for persistence.

Why this answer

Named volumes are specifically designed for persistence and sharing independent of container lifecycles.

69
MCQmedium

What is the role of the 'Dockerfile' in the container build process?

A.To define network topology
B.To list running containers
C.To store container data
D.To provide build instructions
AnswerD

Dockerfile defines the image creation steps.

Why this answer

It contains the instructions for building an image.

70
Multi-Selectmedium

Which TWO of the following are valid storage drivers used by Docker to manage image layers?

Select 2 answers
A.overlay2
B.ext4
C.vfs-driver
D.zfs-layer
E.aufs
AnswersA, E

Overlay2 is the default and recommended driver.

Why this answer

Overlay2 and aufs are both well-known storage drivers for Docker.

71
MCQhard

You are troubleshooting a Docker container that cannot reach the internet despite the host having connectivity. The container uses the default bridge network. Which iptables chain is most likely causing the block?

A.PREROUTING
B.POSTROUTING
C.FORWARD
D.OUTPUT
AnswerC

Docker injects rules into the FORWARD chain to control inter-network traffic.

Why this answer

Docker adds rules to the FORWARD chain in the filter table to manage traffic between the bridge network and external networks.

72
MCQeasy

Which command provides system-wide information about the Docker installation?

A.docker inspect
B.docker status
C.docker info
D.docker version
AnswerC

Shows system configuration.

Why this answer

'docker info' shows details like the number of containers, images, and storage driver.

73
MCQmedium

You need to run a container that requires access to the host's network namespace directly to perform packet capture. Which Docker run flag should you use?

A.--cap-add NET_ADMIN
B.--privileged
C.--net bridge
D.--network host
AnswerD

This flag joins the container to the host network stack.

Why this answer

The --network host flag allows a container to share the host's networking namespace, providing full access to host network interfaces.

74
MCQeasy

Which flag is used to run a container in the background?

A.-t
B.-b
C.-d
D.-i
AnswerC

Detached (background) mode.

Why this answer

The -d or --detach flag runs the container in the background.

75
MCQmedium

What is the purpose of the 'ENTRYPOINT' instruction in a Dockerfile?

A.To run build-time commands
B.To copy files
C.To configure the container as an executable
D.To set environment variables
AnswerC

This sets the default command for the container.

Why this answer

ENTRYPOINT allows you to configure a container that will run as an executable.

Page 1 of 2 · 80 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Container Virtualization questions.