Docker Interview Questions
Images, containers, Dockerfile best practices, multi-stage builds, volumes, networking, security, and health checks.
Showing 1–20 of 100
#1What is Docker and how does it differ from a VM?
#2What is the difference between a Docker image and a container?
#3Explain the difference between CMD and ENTRYPOINT in a Dockerfile.
#4What is a multi-stage build and why is it important?
#5What are Docker volumes and when would you use bind mounts instead?
#6Explain Docker networking modes.
#7How do you reduce Docker image size?
#8How does Docker layer caching work?
#9What is Docker Compose and when would you use it?
#10How does Docker handle secrets?
#11What is a Docker health check?
#12What is the Docker daemon and how does it work?
#13What is container security hardening?
#14How do you handle logging in Docker containers?
#15What is the difference between docker stop and docker kill?
#16What is BuildKit and how does it improve Docker builds?
#17How do you debug a running Docker container?
#18What is Docker Swarm and how does it compare to Kubernetes?
#19What are Docker labels and how are they used?
#20How does Docker's overlay filesystem work?
Showing 1–20 of 100
Ask Aria about Docker
Sign in to chat with Aria
All 100 Docker questions at a glance
- What is Docker and how does it differ from a VM?(Easy)
- What is the difference between a Docker image and a container?(Easy)
- Explain the difference between CMD and ENTRYPOINT in a Dockerfile.(Medium)
- What is a multi-stage build and why is it important?(Medium)
- What are Docker volumes and when would you use bind mounts instead?(Medium)
- Explain Docker networking modes.(Medium)
- How do you reduce Docker image size?(Medium)
- How does Docker layer caching work?(Medium)
- What is Docker Compose and when would you use it?(Easy)
- How does Docker handle secrets?(Hard)
- What is a Docker health check?(Medium)
- What is the Docker daemon and how does it work?(Hard)
- What is container security hardening?(Hard)
- How do you handle logging in Docker containers?(Medium)
- What is the difference between docker stop and docker kill?(Medium)
- What is BuildKit and how does it improve Docker builds?(Hard)
- How do you debug a running Docker container?(Medium)
- What is Docker Swarm and how does it compare to Kubernetes?(Medium)
- What are Docker labels and how are they used?(Easy)
- How does Docker's overlay filesystem work?(Hard)
- What is the .dockerignore file and why is it important?(Easy)
- What are Docker ARG and ENV and how do they differ?(Medium)
- What is the difference between COPY and ADD in a Dockerfile?(Easy)
- How do you set resource limits on Docker containers?(Medium)
- What is a Docker registry and how do you set up a private one?(Medium)
- What is WORKDIR in a Dockerfile and why should you use it?(Easy)
- How does Docker handle container restart policies?(Easy)
- What is the principle of container immutability and how do you implement it?(Medium)
- How do you handle environment-specific configuration in Docker?(Medium)
- What is Docker Content Trust and image signing?(Hard)
- How does Docker networking work internally? (veth pairs and iptables)(Hard)
- What is a multi-platform Docker image and how do you build one?(Medium)
- How do you manage Docker logs at scale?(Hard)
- What is the difference between EXPOSE and port publishing in Docker?(Easy)
- How do you optimize Docker images for Java/Spring Boot applications?(Hard)
- What is Docker-in-Docker (DinD) and why is it problematic?(Hard)
- How do you troubleshoot a container that won't start?(Medium)
- What is the Open Container Initiative (OCI) specification?(Hard)
- How do you use Docker for local database development?(Easy)
- How do you use Docker exec and what are common use cases?(Easy)
- What is a Dockerfile SHELL instruction?(Medium)
- What is Rootless Docker and why does it matter for security?(Hard)
- How do you use Docker Compose for integration testing?(Medium)
- What is Docker image tagging strategy?(Medium)
- What is the difference between CMD in shell form vs exec form?(Medium)
- How do you build Docker images in CI/CD pipelines efficiently?(Hard)
- What is container escape and how do you prevent it?(Hard)
- How do you implement a Docker-based database migration workflow?(Hard)
- What is a Docker context?(Medium)
- What are cgroups and how does Docker use them?(Hard)
- How do you scan Docker images for vulnerabilities?(Medium)
- How do you implement service-to-service communication with Docker Compose?(Medium)
- What is the impact of running as PID 1 in a container?(Hard)
- What are Docker Compose profiles?(Easy)
- How do you monitor Docker containers?(Medium)
- How do you use Docker volumes for persistent data and backups?(Medium)
- What is seccomp and how does Docker use it for security?(Hard)
- What is a distroless image and when should you use it?(Medium)
- How do you cache dependencies effectively for different languages in Docker?(Medium)
- What is an image manifest and manifest list?(Hard)
- How do you debug network issues between Docker containers?(Hard)
- What is the Docker container lifecycle?(Easy)
- How do you handle TLS/SSL certificates in Docker containers?(Hard)
- What is COPY --chown and how do you set file permissions in Dockerfile?(Medium)
- How do you implement blue-green deployments with Docker?(Hard)
- What is Docker's garbage collection and how do you manage disk space?(Easy)
- What is the FROM scratch instruction in Docker?(Hard)
- How do you use Docker for performance profiling and memory analysis?(Hard)
- What is Docker Desktop and how does it differ from Docker Engine?(Easy)
- What are Linux namespaces and which ones does Docker use?(Hard)
- How do you implement health-dependent startup ordering in Docker Compose?(Medium)
- What is a containerd shim and why does it exist?(Hard)
- How do you share data between containers in Docker?(Medium)
- What is Podman and how does it compare to Docker?(Medium)
- How do you handle configuration management across multiple Docker environments?(Medium)
- What is the difference between docker commit and building from Dockerfile?(Easy)
- How do you configure the Docker daemon (dockerd)?(Medium)
- What is the Docker build context and how does it affect build performance?(Medium)
- How do you implement canary deployments with Docker and Nginx?(Hard)
- What are Docker capabilities and how do you manage them?(Hard)
- How do you use Docker with GitHub Actions for CI/CD?(Medium)
- What is the Docker Compose watch feature and how does it improve developer experience?(Easy)
- How does Docker handle DNS resolution for containers?(Hard)
- What is image layer sharing and how does it save storage?(Medium)
- How do you implement autoscaling with Docker and a load balancer?(Hard)
- What is Docker Scout and how does it improve supply chain security?(Medium)
- How do you run stateful applications in Docker?(Medium)
- What is AppArmor and how does Docker use it?(Hard)
- How do you handle log rotation and disk usage for Docker container logs?(Medium)
- What are Docker's best practices for production deployments?(Medium)
- What is Kaniko and when should you use it over Docker-in-Docker?(Hard)
- How do you optimize Docker for Node.js applications?(Medium)
- What is Docker's host network mode and when should you use it?(Medium)
- What is an SBOM and how do you generate one for Docker images?(Medium)
- How do you handle Docker in air-gapped or offline environments?(Hard)
- What is a multi-container application pattern vs microservices in Docker?(Medium)
- How do you debug a crashed container and analyze the crash dump?(Hard)
- How do you implement service health checks and readiness probes in production?(Medium)
- What is BuildKit's advanced cache mount and secret mount feature?(Hard)
- What are the limits of Docker and when should you move to Kubernetes?(Medium)