W3Reference.com
Toggle Menu
Home
Online Rust Compiler
Tutorials
Python Tutorial
Java Tutorial
Rust Tutorial
TypeScript Tutorial
ReactJS Tutorial
HTML & CSS Basics
Docker Containers Guide
Kubernetes Tutorial
Software Design Patterns
Blog
All Posts
Docker Networking and Volumes
Check your understanding of how Docker manages data and networking between containers.
1. What is the default network driver used by Docker when creating a new container?
bridge
host
overlay
none
2. Which command is used to create a named Docker volume?
docker volume create
docker create volume
docker volume new
docker new volume
3. Which Docker network mode allows a container to share the host's network stack directly?
bridge
host
overlay
macvlan
4. Which Docker volume type persists data even after the container is deleted and is managed by Docker?
Bind mount
Anonymous volume
Named volume
tmpfs mount
5. What is the purpose of the '-p' (or '--publish') flag in the 'docker run' command?
Pull the image from a registry
Publish the container to a Docker Hub
Map a container port to a host port
Pause the container after startup
6. Which Docker network driver is designed for communication between containers running on different Docker daemons (e.g., in a swarm cluster)?
bridge
overlay
host
macvlan
7. Which of the following are valid Docker network types?
bridge
host
overlay
macvlan
tmpfs
8. Which commands can be used to inspect details of a Docker volume?
docker volume inspect
docker inspect volume
docker volume ls
docker inspect
9. Which of the following are advantages of using named volumes over bind mounts?
Managed by Docker's storage system
Can be easily shared across multiple containers
Do not require knowledge of the host system's directory structure
Automatically deleted when the container is removed
10. Containers on which of the following Docker network modes can communicate with each other using their container names or IP addresses without requiring explicit port mapping?
bridge
host
overlay
none
11. Docker automatically creates a named volume if it does not exist when referenced in a 'docker run' command with the '-v' flag.
True
False
12. A bind mount stores data in Docker's default storage directory (/var/lib/docker/volumes) by default.
True
False
13. Containers connected to the same bridge network can communicate using their container names as hostnames (e.g., 'ping container-name').
True
False
14. What is the default driver used for Docker volumes? (single word)
15. What is the Docker command to list all existing volumes? (format: 'docker ...')
Reset
Answered 0 of 0 — 0 correct