Ravindra BagaleCourses & study guides

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

  1. 6.1Why containers — box the app runtime
  2. 6.2Image vs container vs layers
  3. 6.3Dockerfile — FROM, COPY, RUN, CMD, EXPOSE
  4. 6.4build, run, ps, logs, exec, stop
  5. 6.5Port publish -p — host port to container port
  6. 6.6Layer caching and .dockerignore (speed + safety)
  7. 6.7Environment variables at run time
  8. 6.8Troubleshooting table (first week)
  9. 6.9Useful inspect habits (still beginner)
  10. 6.10Lab — Dockerfile for badge API hello

The chapter recap is at the end of the last concept page.