What is a container in cloud computing?
A container packages an application together with everything it needs to run, like libraries and settings, so it behaves the same everywhere. Containers are lightweight because they share the host operating system instead of each running a full one. Docker is the most common tool, and containers make apps easy to move and deploy consistently.
- A container packages an app with its dependencies so it runs the same everywhere.
- Containers are lightweight and share the host operating system kernel.
- Docker is the common tool, and Kubernetes orchestrates many containers.
Container versus virtual machine
A virtual machine includes a full operating system, which makes it heavy and slow to start. A container shares the host operating system and only packages the app and its dependencies, so it is small and starts in seconds.
- Consistent: runs the same on a laptop and in the cloud.
- Lightweight: shares the host OS, so it is fast and small.
- Portable: move it between environments easily.
The line interviewers want is containers are lightweight because they share the host OS, while VMs each run a full OS. That single contrast answers the most common follow up before it is even asked.
Frequently asked questions
What is the difference between a container and a virtual machine?
A virtual machine includes a full guest operating system, while a container shares the host kernel, making it lighter and faster to start.
What is Kubernetes?
Kubernetes is an orchestration platform that deploys, scales, and manages containers across many machines automatically.
Common follow up questions
Related interview questions
Want the full Cloud guide?
Read every Cloud concept with notes, diagrams, and code in one place. Track your progress as you go.
Open the Cloud guide All Cloud questions