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 Fundamentals
Test your understanding of containerization concepts,Docker architecture,and core commands.
1. What is a Docker image?
A running container
A read-only template
A network configuration
A storage volume
2. Which command builds a Docker image from a Dockerfile?
docker build
docker create
docker run
docker commit
3. What is the default network driver in Docker?
bridge
host
overlay
macvlan
4. Which file defines multi-container applications in Docker?
Dockerfile
docker-compose.yml
dockerfile.yml
compose.yaml
5. What does the '-d' flag do in 'docker run -d'?
Detach mode (run in background)
Delete container after run
Debug mode
Daemon mode
6. What is a Docker container?
A read-only template
An instance of a Docker image
A storage location
A network interface
7. Which command lists all running Docker containers?
docker ps
docker ls
docker containers
docker list
8. What is the primary purpose of a Docker volume?
To build Docker images
To persist data outside the container's filesystem
To configure container networks
To define environment variables
9. Which command is used to view local Docker images?
docker images
docker ls images
docker image list
docker view
10. What does 'docker pull' do?
Runs a container
Builds an image
Downloads an image from a registry
Stops a container
11. Which of the following are valid Dockerfile instructions?
FROM
RUN
COPY
EXPOSE
PULL
12. Which flags can be used with 'docker run' to map ports?
-p
--port
-P
--publish
-m
13. Which statements about Docker containers vs. virtual machines (VMs) are true?
Containers share the host OS kernel
VMs are lighter than containers
Containers boot faster than VMs
VMs require a hypervisor
Containers cannot run different OSes than the host
14. Which commands can stop a running Docker container?
docker stop
docker kill
docker halt
docker terminate
docker down
15. Docker containers are isolated from each other by default.
True
False
16. A Docker image can be modified after creation.
True
False
17. Docker Compose requires a Dockerfile to run services.
True
False
18. What command removes a Docker image? (full command)
19. Name the tool used to define and run multi-container Docker applications (abbrev.)
20. What term describes the temporary writable layer added to a container when it runs?
Reset
Answered 0 of 0 — 0 correct