TGViewer
Coding Interview Preparation Coding Interview Preparation @coding_interview_preparation · 5.9K subscribers
Post #1207 608
✅ Docker Interview Questions & Answers 🐳🔧 

1️⃣ What is Docker?
A:
Docker is an open-source platform that uses containerization to package, distribute, and run applications in isolated environments called containers.

2️⃣ What is a Container?
A:
A lightweight, standalone executable package including code, runtime, libraries, and settings—runs consistently across any system.

3️⃣ Docker vs Virtual Machines (VMs) 
- Docker: Shares host OS kernel, fast & efficient (MBs) 
- VMs: Full OS per instance, heavier (GBs), slower startup 

4️⃣ What is a Docker Image?
A:
A read-only template (like a snapshot) used to create containers; built from a Dockerfile with layers of instructions.

5️⃣ Common Docker Commands:
- docker run → Start a container from an image 
- docker build → Create an image from Dockerfile 
- docker ps → List running containers 
- docker images → List available images 
- docker stop → Stop a running container 
- docker pull → Download an image from registry 
- docker push → Upload image to registry 

6️⃣ What is a Dockerfile?
A:
A text file with instructions to automate building Docker images (e.g., FROM, RUN, COPY, CMD).

7️⃣ What is Docker Compose?
A:
A tool for defining and running multi-container apps using YAML files—manages services, networks, volumes.

*8️⃣ What is Docker Hub?* 
*A:* A public registry for storing and sharing Docker images, like GitHub for code.

9️⃣ What is Docker Swarm?
A:
Docker's native clustering/orchestration tool for managing a swarm of Docker nodes and deploying services.

🔟 What are Docker Volumes? 
A: Persistent storage for containers; data survives container lifecycle—mount host directories or use named volumes.

1️⃣1️⃣ What is Docker Networking?
A:
Connects containers and services; modes include bridge (default), host, overlay (for Swarm), none.

1️⃣2️⃣ How to Build a Docker Image?
A:
Write a Dockerfile, run docker build -t image-name. in the directory—tags it for easy reference.

1️⃣3️⃣ Difference between CMD and ENTRYPOINT?
- CMD: Default args for executable; can be overridden 
- ENTRYPOINT: Sets container's executable; args append to it 

1️⃣4️⃣ What is Container Orchestration? 
A:
Managing multiple containers at scale; tools like Kubernetes, Docker Swarm handle deployment, scaling, load balancing.

1️⃣5️⃣ How to Handle Docker Security? 
A:
Run as non-root, scan images (e.g., Trivy), use minimal base images, limit privileges, and keep software updated.

💬 Tap ❤️ if you found this useful!
  • ❤ 3
More from @coding_interview_preparation
  1. Oct 12, 2026Java Coding Interview Questions Easy 1. Reverse a string without using a built-in reverse…
  2. Oct 10, 2026100 SQL interview questions
  3. Oct 8, 2026If you're prepping for system design interviews, this repo is gold It contains a curated,…
  4. Oct 6, 2026document post
  5. Oct 4, 2026💼 Why Your Resume Gets Rejected Before a Human Reads It You may have good skills and proj…
  6. Oct 2, 2026🧠 Coding Myths You Should Stop Believing There's a lot of advice online about learning to…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →