All questions
Showing of 45What is Docker and how does it differ from virtual machines?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Docker is a containerization platform that packages an application and its dependencies into lightweight, portable containers. Unlike virtual machines (VMs), which virtualize an entire operating system, Docker containers share the host OS kernel while keeping each application isolated.
The key differences:
- Containers use fewer resources, because they share the host kernel.
- Containers start in seconds, while VMs take minutes.
- Containers run the same way across different environments.
- VMs give stronger isolation, but at a higher overhead cost.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Explain the Docker architecture and its main components.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Docker uses a client-server architecture. The docker CLI is the client. It sends each command over a REST API to the Docker daemon, dockerd, which builds, runs and distributes containers.
Its main components:
- The Docker client is the command-line interface, and it can talk to a local or remote daemon.
- The Docker daemon is a background service that manages containers, images and networks.
- An image is a read-only template used to create containers.
- A container is a running instance of an image.
- A registry stores images. Docker Hub is the default public registry, and you can also run a private one.
- Docker Engine is the complete platform: the daemon, its REST API and the CLI.
Below the daemon, containerd manages each container's lifecycle, and it uses runc to create the container itself.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is a Docker image and how is it different from a Docker container?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
A Docker image is a read-only template that holds the application code together with its runtime, libraries and dependencies. A Docker container is a running instance of an image.
The key differences:
- An image is an immutable blueprint. A container is a mutable runtime environment, with its own writable layer on top of the image.
- You store and share an image. A container is what runs your application's process.
- You can create many containers from a single image.
- Changes made inside a container don't affect the original image.
For example:
# Image exists as a template
docker images
# Container is created and runs from image
docker run nginx
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What are the main benefits of using Docker?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Docker's main benefit is consistency. An image carries the app together with its dependencies, so code that works on a developer's machine behaves the same in testing and production.
Other benefits:
- Applications run anywhere Docker is installed, which makes them portable.
- Scaling out means starting more containers from the same image.
- Containers share the host kernel and run no guest OS, so they need fewer resources than a traditional virtual machine.
- Setting up a development environment is instant, so development cycles are faster.
- Each service runs in its own container, which suits breaking a monolith into microservices.
- CI/CD pipelines build, test and deploy the same image at every stage.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
How do you create a Docker container from an image?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Use docker run, which creates a container from an image and starts it in one step. If the image isn't on the host yet, Docker first pulls it from the registry.
docker run does the work of two commands. docker create makes the container by adding a writable layer on top of the image, and docker start runs its main process. Docker also connects the container to the default network unless you choose another one.
The flags below name the container, publish a port, and run it detached or interactively.
# Basic container creation
docker run nginx
# Run with custom name and port mapping
docker run --name my-nginx -p 8080:80 nginx
# Run in background (detached mode)
docker run -d --name web-server nginx
# Run interactively
docker run -it ubuntu bash
When the main process exits, the container stops but isn't removed, so you can start it again later.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Explain the difference between docker run and docker start.
What is a Dockerfile and what are its key instructions?
What is Docker port mapping and how does it work?
What are Docker volumes and why are they important?
What is Docker Compose and when would you use it?
How do you clean up Docker resources (images, containers, volumes)?
How do you manage the container lifecycle (start, stop, restart, remove)?
What is the difference between the COPY and ADD instructions in a Dockerfile?
Explain the difference between CMD and ENTRYPOINT.
What are multi-stage builds and why are they useful?
How do you optimize Docker image size?
Explain Docker networking modes.
How do containers communicate with each other?
Explain the difference between volumes, bind mounts, and tmpfs mounts.
How do you backup and restore Docker volumes?
Explain the key sections of a docker-compose.yml file.
How do you scale services using Docker Compose?
What are Docker security best practices?
How do you run containers as non-root users?
How do you monitor Docker container performance?
How do you limit container resources (CPU, memory)?
What are container health checks and how do you implement them?
How do you implement Docker in CI/CD pipelines?
What is a Docker registry and how do you set up a private registry?
How do you handle secrets in Docker containers?
How do you debug a failing Docker container?
What is the difference between docker exec and docker attach?
What is the difference between ARG and ENV in a Dockerfile?
What are Docker restart policies, and when do you use each one?
What is the difference between the shell form and exec form of CMD and ENTRYPOINT?
How does the Docker build cache work?
Why is the latest tag risky, and how should you tag images?
What is the difference between docker save and docker export?
What are Docker build contexts and why do they matter?
What is Docker Swarm and how does it compare to Kubernetes?
What is Docker Content Trust and how does it work?
What are common Docker performance issues and solutions?
How do you handle container logs in production?
Explain the Docker layered file system and how it works.
How does Docker use Linux namespaces and cgroups to isolate containers?
This answer is part of Pro.
The full written answer, with the trade-offs and follow-ups an interviewer will probe.
No matches
Try a different filter or search term.
Docker cheatsheet
- Docker Fundamentals01
- Essential Commands02
- Dockerfile03
- Docker Compose04
- Networking05
- Volumes & Storage06
- Security Best Practices07
- Performance Optimization08
- Container Orchestration09
- Common Interview Topics10
- Quick Reference Card11
- + 5 more inside
40 of 45 Docker answers are in Pro.
Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.
- Full answers + code
- AI explanations, simpler or deeper
- 1,000 AI credits / month
- Cancel anytime
Change topic
Pick a different technology or stack. Your current topic stays put until you choose a new one.
MEAN
MongoDB, Express, Angular, Node.jsMERN
MongoDB, Express, React, Node.jsDjango
Python Full-Stack DevelopmentRuby on Rails
Convention over ConfigurationServerless on AWS
Serverless Architecture on AWSInterviewers also test these - they're common to every stack, whichever one you picked above.
Flutter Mobile
Flutter Cross-Platform Mobile DevelopmentInterviewers also test these - they're common to every stack, whichever one you picked above.
Spring Boot
Enterprise Java Development.NET
Microsoft EcosystemVue
Vue.js, Vite, TypeScript, Tailwind, Node.jsGo Backend
Golang, gRPC, PostgreSQL, Redis, RabbitMQInterviewers also test these - they're common to every stack, whichever one you picked above.
FastAPI
Python, FastAPI, SQLAlchemy, PostgreSQLReact Native
React, TypeScript, Redux, FirebaseiOS Native
Swift, SwiftUI, UIKit, FirebaseAndroid Native
Java, Jetpack Compose, FirebaseDevOps / Platform
Docker, Kubernetes, Terraform, CI/CDInterviewers also test these - they're common to every stack, whichever one you picked above.
AI Engineer
LLMs, RAG, Agents, EvalsAI-Powered Developer
Claude Code, Copilot, Agentic WorkflowsCore SWE Interview Prep
Data structures, algorithms, OS, concurrency, networking, gitInterviewers also test these - they're common to every stack, whichever one you picked above.
Interviewers also test these - they're common to every stack, whichever one you picked above.