Day 1/40 - Docker Tutorial For Beginners - Docker Fundamentals - CKA Full Course 2025
Overview
This video is Day 1 of the 40-day CKA preparation course. Before diving into Kubernetes, the instructor establishes the Docker foundation — covering container architecture, the Docker workflow, essential commands, and the critical differences between Virtual Machines (VMs) and containers. Docker fluency is treated as a non-negotiable prerequisite for understanding how Kubernetes orchestrates workloads.
Source Details
- Channel: Tech Tutorials with Piyush
- Playlist: 40 Days of Kubernetes (CKA Full Course)
- Companion Repository: piyushsachdeva/CKA-2024
- Challenge:
#40daysofKubernetes
Key Takeaways
1. Why Docker Before Kubernetes?
- Kubernetes is a container orchestrator — it manages Docker containers at scale.
- Without understanding how containers work, Kubernetes concepts (Pods, Deployments, Services) are abstract and hard to debug.
- Docker is the runtime Kubernetes uses under the hood (via containerd / CRI-O).
2. Virtual Machines (VMs) vs. Containers
| Aspect | Virtual Machines | Containers |
|---|---|---|
| Architecture | Heavy — each VM includes a full OS kernel | Lightweight — shares the host OS kernel |
| Boot Time | Minutes | Seconds |
| Resource Usage | High (GBs of RAM per VM) | Low (MBs of RAM per container) |
| Isolation | Hardware-level (Hypervisor) | OS-level (cgroups + namespaces) |
| Portability | Hard to move across environments | Packaged as images, runs anywhere |
| Use Case | Multi-OS environments, legacy apps | Microservices, CI/CD, cloud-native apps |
3. Docker Architecture
- Docker Client (
dockerCLI): The command-line interface users interact with. - Docker Daemon (
dockerd): The background service that manages images, containers, networks, and volumes. - Docker Registry (Docker Hub): Stores and distributes Docker images.
- Docker Image: A read-only template with application code + dependencies.
- Docker Container: A runnable instance of an image — isolated, portable, and ephemeral.
4. Essential Docker Workflow
- Write a
Dockerfile— defines the image blueprint. - Build an image —
docker build -t myapp:1.0 . - Run a container —
docker run -d -p 8080:80 myapp:1.0 - Push to registry —
docker push myapp:1.0 - Pull & deploy —
docker pull myapp:1.0
5. Critical Docker Commands for CKA
| Command | Purpose |
|---|---|
docker run | Create and start a container |
docker ps | List running containers |
docker ps -a | List all containers (including stopped) |
docker stop <id> | Gracefully stop a container |
docker rm <id> | Remove a stopped container |
docker images | List local images |
docker rmi <image> | Remove an image |
docker logs <id> | View container logs |
docker exec -it <id> /bin/sh | Enter a running container |
docker build -t <tag> . | Build an image from a Dockerfile |
6. Container Lifecycle
- Created →
docker create - Running →
docker start/docker run - Paused →
docker pause - Stopped →
docker stop - Deleted →
docker rm
7. Docker as the Kubernetes Runtime
- Kubernetes does not run containers directly — it instructs a Container Runtime Interface (CRI) to do so.
- Common CRIs: containerd (Docker’s runtime, now independent), CRI-O (Red Hat).
- Understanding Docker helps you debug Kubernetes pods:
kubectl describe pod,kubectl logs,kubectl exec.
Cross-References
Ingested: 2026-05-21