NEW
Font size
WorksheetsDocker Networking and Storage
Total questions: 37
Worksheet time: 37mins
Which of the following is the default network a container will join if you don't override with the --network flag?
Overlay
Bridge
MACVLAN
WIFI
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?
docker ip inspect nat
docker inspect nat
docker ip nat
docker network nat
docker network inspect nat
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?
NAT
Overlay
Bridge
MACVLAN
What Docker technologies are available to support communication between containers?
Docker connect and bridge networks.
None of these.
Docker connect and alias networks.
Docker linking and bridge networks.
Which of the following docker commands will return detailed configuration information about network?
docker network ls <network>
docker network inspect <network>
docker network ls
docker inspect <network>
What benefits do container networks offer?
Allow local containers to communicate with external host containers.
Allow containers to communicate with each other in an isolated network.
Allow local container to communicate directly with host processes.
All of these.
What Docker CLI command can be used to create a container network?
docker build network
docker ps network
docker network create
docker createNetwork
How can you connect a container to a user defined network?
--net NETWORK_NAME
--udf NETWORK_NAME
docker disconnect
docker attach
docker connect
Which of the following network types would you choose if you needed your containers to be first class on one of your existing VLANs?
Bridge
Overlay
MACVLAN
NAT
Which Docker command show the network ports that a container is exposed on?
docker port
docker network --port
docker container ports
What command line switches are used with legacy linking?
--net and --name
--link and --name
--com and --name
--run and --link
Why is networking a concern with containers?
All of these.
Because you have to use port forwarding to share the host's physical network adapter.
Because container networking is a new frontier and is different that how you network VMs and physical machines.
Because you don't want applications to have port conflicts.
Because each container usually has its own network namespace that needs configuration.
Which feature is shared by both user-defined Docker bridge networks and the default Docker bridge network?
The ability to securely isolate a container from external hosts.
Greater interoperability between containerized applications.
Automatic Domain Name System (DNS) resolution between container.
Attaching and detaching a bridge from a running container.
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?
Each container is attached to the bridge network on each respective Docker host.
You have not created the overlay network on every node.
Your Docker hosts are on different layer 5 networks.
One or both containers have networking disabled by default.
How does the Docker daemon assign an IP address to a newly started container?
From a range of addresses specified in the "DOCKER_OPTS" line in the Docker config files.
From a pool assigned to be "docker0" bridge.
From a range of addresses specified in the "NETWORK_OPTS" line in the Docker config files.
From a static config file.
Which command will successfully create a new Docker bridge network?
docker network-bridge -i newNet generate
docker network create netNet
docker bridge add netNet
docker net add netNet
What is a Docker volume?
A directory that mounts remote files.
The union file system for a container.
The host file system.
A directory that bypass the container's union file system.
Which of following statements accurately describe a Docker volume?
All of these
Are not affected by updates to image.
Persisted even after a container is deleted.
Special type of directory in a container.
Can be shared and reused among containers.
What will happen if you start a new container or service and specify a volume that does not currently exist?
The command will complete but the container/service will fail to start.
Docker will create the volume for you.
The command will fail.
You will be prompted to create new volume.
Where do dangling volumes typically come?
Container that we manually mount managed volumes into.
Container that we bind-mount host volumes into.
Image that have a VOLUME instruction.
Every container that is created has a volume creates as well.
What type of storage takes care of a containers union filesystem/union mount?
copy-on-write (CoW)
Graph Driver (snapshotter)
Object storage
Volume data
Which of the following a major goal of Docker volues?
Persistent data
Object storage
Data replication
Data encryption at-rest
RAID
What happens when you perform a docker volume rm against a volume attached to a running container?
The volume and the container will be deleted.
The command will fail.
You will be asked to confirm the command.
The volume will be deleted.
Which of the following use Docker's layered file system.
Docker containers only.
Docker images and container.
Docker images only.
VirtualBox
All of these.
Which of the following describes data that we need to keep long-term?
Ephemeral
Non-persistent
Persistent
Immutable
Where does a container's graph driver storage usually exists?
/var/lib/docker
/etc/docker
/var/run/docker
What happens to data in a volume when the last container it was connected to is deleted?
The data remain intact.
The data is deleted along with the latest container.
What a syntax can be used to create a volume that "hooks" to a source code folder on your machine?
docker run -v $(pwd):/app <container_image>
docker run --vol /var/temp <container_image>
None of these
docker run -v /var/www <container_image>
Which of the following commands will list all of the Docker volumes on a particular Docker host?
docker system info | grep volumes
docker volume ls
docker node volumes
Docker volumes are persisted even after a container is deleted.
TRUE
FALSE
What syntax can be used to create a volume that Docker manages?
None of these
docker run -v /var/www <container_image>
docker run -v /temp:/var/temp <container_image>
docker run --vol /temp:/var/temp <container_image>
What is the purpose of a volume in container?
A volume "links" a container directory to a host directory.
A volume provides a documentation for a conainer.
A volume acts as the base image for a container.
A volume acts as a container for images.
What can you use to create persistent storage in a container?
Volume
Image layers
Share the container host's (root) mount namespace
Root file system
Which of the following is NOT a benefit of a union filesystem for containers?
Decrease startup time for containers with images pre-existed into an image cache.
Save disk space by sharing common files with the host OS filesystem via symbolic links.
Share page cache entries to reduce memory overhead.
Save disk space with read-only layers reused among containers.
You must ensure that all of your Docker hosts are running the Device Mapper storage driver (devicemapper). Which command shows this?
docker storage info
docker info
docker version
docker storage-driver info
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?
docker volume ls *
docker volume inspect prod-sunderland
docker volumes show
docker volume ls prod-sunderland
Why do data volumes provide better read and write input/output (I/O) than storing data directly inside your container?
They operate in a cache write-through mode.
They can be mounted on high speed, low-latency, storage are network (SAN) and network-attached storage (NAS) devices.
They bypass the CoW and other features of the Docker storage driver.
Docker storage driver prioritizes data volumes.
