Lesson 7 of 8Article19 min
Virtualization and Containers
Virtualization and Containers
VMs vs containers
- VM: virtualized hardware with separate guest OS kernels.
- Container: process-level isolation sharing host kernel.
- Containers start faster and are lighter; VMs provide stronger isolation boundaries.
Containerized process example
Run isolated Nginx container
docker run --name demo-nginx -p 8080:80 nginx:stable
# Starts Nginx in an isolated container namespace
docker ps
docker stop demo-nginx