Chapter 6: Docker Images and Containers
Chala mitrano, aaj aapan Docker — images aani containers. "Works on my laptop" problem sathi app box karuya: same runtime, every server. Image vs container, layers, Dockerfile, build / run / ps / logs / exec / stop, aani -p host:container ports (published ports). VM deep theory AWS EC2 madhe; ithe box aani run. Ghabru naka: pahila container local curl paryant neuya.
What you will learn in this chapter
- Containers vs VMs in plain English
- Image vs container and layers
- Dockerfile FROM COPY RUN CMD EXPOSE
- build, run, ps, logs, exec, stop
- Publish ports with -p safely
Concepts in this chapter
- 6.1Why containers — box the app runtime
- 6.2Image vs container vs layers
- 6.3Dockerfile — FROM, COPY, RUN, CMD, EXPOSE
- 6.4build, run, ps, logs, exec, stop
- 6.5Port publish -p — host port to container port
- 6.6Layer caching and .dockerignore (speed + safety)
- 6.7Environment variables at run time
- 6.8Troubleshooting table (first week)
- 6.9Useful inspect habits (still beginner)
- 6.10Lab — Dockerfile for badge API hello
The chapter recap is at the end of the last concept page.