wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Docker Networking and Storage

Total questions: 37

Worksheet time: 37mins

Name
Class
Date
1.

Which of the following is the default network a container will join if you don't override with the --network flag?

a)

Overlay

b)

Bridge

c)

MACVLAN

d)

WIFI

2.

You wish to view the assigned IP addresses for all running containers on the "nat" network. Which of the following commands will display this information?

a)

docker ip inspect nat

b)

docker inspect nat

c)

docker ip nat

d)

docker network nat

e)

docker network inspect nat

3.

Which of the following built-in Docker networks creates a single layer-2 container-only network across multiple Docker hosts that can be on different underlying networks?

a)

NAT

b)

Overlay

c)

Bridge

d)

MACVLAN

4.

What Docker technologies are available to support communication between containers?

a)

Docker connect and bridge networks.

b)

None of these.

c)

Docker connect and alias networks.

d)

Docker linking and bridge networks.

5.

Which of the following docker commands will return detailed configuration information about network?

a)

docker network ls <network>

b)

docker network inspect <network>

c)

docker network ls

d)

docker inspect <network>

6.

What benefits do container networks offer?

a)

Allow local containers to communicate with external host containers.

b)

Allow containers to communicate with each other in an isolated network.

c)

Allow local container to communicate directly with host processes.

d)

All of these.

7.

What Docker CLI command can be used to create a container network?

a)

docker build network

b)

docker ps network

c)

docker network create

d)

docker createNetwork

8.

How can you connect a container to a user defined network?

a)

--net NETWORK_NAME

b)

--udf NETWORK_NAME

c)

docker disconnect

d)

docker attach

e)

docker connect

9.

Which of the following network types would you choose if you needed your containers to be first class on one of your existing VLANs?

a)

Bridge

b)

Overlay

c)

MACVLAN

d)

NAT

10.

Which Docker command show the network ports that a container is exposed on?

a)

docker port

b)

docker network --port

c)

docker container ports

11.

What command line switches are used with legacy linking?

a)

--net and --name

b)

--link and --name

c)

--com and --name

d)

--run and --link

12.

Why is networking a concern with containers?

a)

All of these.

b)

Because you have to use port forwarding to share the host's physical network adapter.

c)

Because container networking is a new frontier and is different that how you network VMs and physical machines.

d)

Because you don't want applications to have port conflicts.

e)

Because each container usually has its own network namespace that needs configuration.

13.

Which feature is shared by both user-defined Docker bridge networks and the default Docker bridge network?

a)

The ability to securely isolate a container from external hosts.

b)

Greater interoperability between containerized applications.

c)

Automatic Domain Name System (DNS) resolution between container.

d)

Attaching and detaching a bridge from a running container.

14.

You have two containers on separate Docker hosts with multi-host networking. Your containers cannot connect to each other. What is the most likely cause?

a)

Each container is attached to the bridge network on each respective Docker host.

b)

You have not created the overlay network on every node.

c)

Your Docker hosts are on different layer 5 networks.

d)

One or both containers have networking disabled by default.

15.

How does the Docker daemon assign an IP address to a newly started container?

a)

From a range of addresses specified in the "DOCKER_OPTS" line in the Docker config files.

b)

From a pool assigned to be "docker0" bridge.

c)

From a range of addresses specified in the "NETWORK_OPTS" line in the Docker config files.

d)

From a static config file.

16.

Which command will successfully create a new Docker bridge network?

a)

docker network-bridge -i newNet generate

b)

docker network create netNet

c)

docker bridge add netNet

d)

docker net add netNet

17.

What is a Docker volume?

a)

A directory that mounts remote files.

b)

The union file system for a container.

c)

The host file system.

d)

A directory that bypass the container's union file system.

18.

Which of following statements accurately describe a Docker volume?

a)

All of these

b)

Are not affected by updates to image.

c)

Persisted even after a container is deleted.

d)

Special type of directory in a container.

e)

Can be shared and reused among containers.

19.

What will happen if you start a new container or service and specify a volume that does not currently exist?

a)

The command will complete but the container/service will fail to start.

b)

Docker will create the volume for you.

c)

The command will fail.

d)

You will be prompted to create new volume.

20.

Where do dangling volumes typically come?

a)

Container that we manually mount managed volumes into.

b)

Container that we bind-mount host volumes into.

c)

Image that have a VOLUME instruction.

d)

Every container that is created has a volume creates as well.

21.

What type of storage takes care of a containers union filesystem/union mount?

a)

copy-on-write (CoW)

b)

Graph Driver (snapshotter)

c)

Object storage

d)

Volume data

22.

Which of the following a major goal of Docker volues?

a)

Persistent data

b)

Object storage

c)

Data replication

d)

Data encryption at-rest

e)

RAID

23.

What happens when you perform a docker volume rm against a volume attached to a running container?

a)

The volume and the container will be deleted.

b)

The command will fail.

c)

You will be asked to confirm the command.

d)

The volume will be deleted.

24.

Which of the following use Docker's layered file system.

a)

Docker containers only.

b)

Docker images and container.

c)

Docker images only.

d)

VirtualBox

e)

All of these.

25.

Which of the following describes data that we need to keep long-term?

a)

Ephemeral

b)

Non-persistent

c)

Persistent

d)

Immutable

26.

Where does a container's graph driver storage usually exists?

a)

/var/lib/docker

b)

/etc/docker

c)

/var/run/docker

27.

What happens to data in a volume when the last container it was connected to is deleted?

a)

The data remain intact.

b)

The data is deleted along with the latest container.

28.

What a syntax can be used to create a volume that "hooks" to a source code folder on your machine?

a)

docker run -v $(pwd):/app <container_image>

b)

docker run --vol /var/temp <container_image>

c)

None of these

d)

docker run -v /var/www <container_image>

29.

Which of the following commands will list all of the Docker volumes on a particular Docker host?

a)

docker system info | grep volumes

b)

docker volume ls

c)

docker node volumes

30.

Docker volumes are persisted even after a container is deleted.

a)

TRUE

b)

FALSE

31.

What syntax can be used to create a volume that Docker manages?

a)

None of these

b)

docker run -v /var/www <container_image>

c)

docker run -v /temp:/var/temp <container_image>

d)

docker run --vol /temp:/var/temp <container_image>

32.

What is the purpose of a volume in container?

a)

A volume "links" a container directory to a host directory.

b)

A volume provides a documentation for a conainer.

c)

A volume acts as the base image for a container.

d)

A volume acts as a container for images.

33.

What can you use to create persistent storage in a container?

a)

Volume

b)

Image layers

c)

Share the container host's (root) mount namespace

d)

Root file system

34.

Which of the following is NOT a benefit of a union filesystem for containers?

a)

Decrease startup time for containers with images pre-existed into an image cache.

b)

Save disk space by sharing common files with the host OS filesystem via symbolic links.

c)

Share page cache entries to reduce memory overhead.

d)

Save disk space with read-only layers reused among containers.

35.

You must ensure that all of your Docker hosts are running the Device Mapper storage driver (devicemapper). Which command shows this?

a)

docker storage info

b)

docker info

c)

docker version

d)

docker storage-driver info

36.

You have a Docker host with multiple data volumes and must locate the prod-sunderland volume in the Docker host's local file system. Which command will show this?

a)

docker volume ls *

b)

docker volume inspect prod-sunderland

c)

docker volumes show

d)

docker volume ls prod-sunderland

37.

Why do data volumes provide better read and write input/output (I/O) than storing data directly inside your container?

a)

They operate in a cache write-through mode.

b)

They can be mounted on high speed, low-latency, storage are network (SAN) and network-attached storage (NAS) devices.

c)

They bypass the CoW and other features of the Docker storage driver.

d)

Docker storage driver prioritizes data volumes.