Core Docker Commands (Images, Containers, Compose)
This will cover:
- Building images
- Rebuilding with args
- Running containers
- Container lifecycle
- Inspecting and debugging
- Docker Compose commands
- Common variations used in real work
No fluff.
1) Image Building Commands
Basic Build
docker build -t myapp .
t → tag (name:tag)
. → build context (current directory)
Equivalent to:
docker build --tag myapp:latest .
If no tag given → defaults to latest.