|
| 1 | +# Day 37 – Docker Revision & Cheat Sheet |
| 2 | + |
| 3 | +## Goal |
| 4 | +Take a **one-day pause** to consolidate everything from Days 29–36 so Docker actually sticks. |
| 5 | + |
| 6 | +## Expected Output |
| 7 | +- A markdown file: `docker-cheatsheet.md` |
| 8 | +- A markdown file: `day-37-revision.md` with self-check answers |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## Self-Assessment Checklist |
| 13 | +Mark yourself honestly — **can do**, **shaky**, or **haven't done**: |
| 14 | + |
| 15 | +- [ ] Run a container from Docker Hub (interactive + detached) |
| 16 | +- [ ] List, stop, remove containers and images |
| 17 | +- [ ] Explain image layers and how caching works |
| 18 | +- [ ] Write a Dockerfile from scratch with FROM, RUN, COPY, WORKDIR, CMD |
| 19 | +- [ ] Explain CMD vs ENTRYPOINT |
| 20 | +- [ ] Build and tag a custom image |
| 21 | +- [ ] Create and use named volumes |
| 22 | +- [ ] Use bind mounts |
| 23 | +- [ ] Create custom networks and connect containers |
| 24 | +- [ ] Write a docker-compose.yml for a multi-container app |
| 25 | +- [ ] Use environment variables and .env files in Compose |
| 26 | +- [ ] Write a multi-stage Dockerfile |
| 27 | +- [ ] Push an image to Docker Hub |
| 28 | +- [ ] Use healthchecks and depends_on |
| 29 | + |
| 30 | +--- |
| 31 | + |
| 32 | +## Quick-Fire Questions |
| 33 | +Answer from memory, then verify: |
| 34 | +1. What is the difference between an image and a container? |
| 35 | +2. What happens to data inside a container when you remove it? |
| 36 | +3. How do two containers on the same custom network communicate? |
| 37 | +4. What does `docker compose down -v` do differently from `docker compose down`? |
| 38 | +5. Why are multi-stage builds useful? |
| 39 | +6. What is the difference between `COPY` and `ADD`? |
| 40 | +7. What does `-p 8080:80` mean? |
| 41 | +8. How do you check how much disk space Docker is using? |
| 42 | + |
| 43 | +--- |
| 44 | + |
| 45 | +## Build Your Docker Cheat Sheet |
| 46 | +Create `docker-cheatsheet.md` organized by category: |
| 47 | +- **Container commands** — run, ps, stop, rm, exec, logs |
| 48 | +- **Image commands** — build, pull, push, tag, ls, rm |
| 49 | +- **Volume commands** — create, ls, inspect, rm |
| 50 | +- **Network commands** — create, ls, inspect, connect |
| 51 | +- **Compose commands** — up, down, ps, logs, build |
| 52 | +- **Cleanup commands** — prune, system df |
| 53 | +- **Dockerfile instructions** — FROM, RUN, COPY, WORKDIR, EXPOSE, CMD, ENTRYPOINT |
| 54 | + |
| 55 | +Keep it short — one line per command, something you'd actually reference on the job. |
| 56 | + |
| 57 | +--- |
| 58 | + |
| 59 | +## Revisit Weak Spots |
| 60 | +Pick **2 topics** you marked as shaky and redo the hands-on tasks from that day. |
| 61 | + |
| 62 | +--- |
| 63 | + |
| 64 | +## Suggested Flow (45–60 minutes) |
| 65 | +- 10 min: go through the checklist honestly |
| 66 | +- 10 min: answer quick-fire questions |
| 67 | +- 20 min: build your cheat sheet |
| 68 | +- 10 min: redo one weak area |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +## Submission |
| 73 | +1. Add `docker-cheatsheet.md` and `day-37-revision.md` to `2026/day-37/` |
| 74 | +2. Commit and push to your fork |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## Learn in Public |
| 79 | +Share your Docker cheat sheet on LinkedIn — help others revise too. |
| 80 | + |
| 81 | +`#90DaysOfDevOps` `#DevOpsKaJosh` `#TrainWithShubham` |
| 82 | + |
| 83 | +Happy Learning! |
| 84 | +**TrainWithShubham** |
0 commit comments