Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › DevOps

DevOps

Chapter 49: Docker Containers: Lifecycle, docker run Flags, exec, logs, Restart Policies, Limits and Every Container Command: मराठी Cards

English cards · Chapter उघडा

उजळणी (Revision) cards

Container lifecycle. Container का चालत नाही हे कळायला हवं.
उजळणी (Revision) card 1 of 11: Container lifecycle · PNG download करा · Card page उघडा

Lesson: 49.1 Container lifecycle: created, running, paused, stopped, removed

महत्त्वाचे docker run flags. Docker चा बहुतेक भाग म्हणजे योग्य flags सह docker run.
उजळणी (Revision) card 2 of 11: महत्त्वाचे docker run flags · PNG download करा · Card page उघडा

Lesson: 49.2 docker run and its most important flags

exec, attach आणि logs. चालू container च्या आत पाहायचं आहे.
उजळणी (Revision) card 3 of 11: exec, attach आणि logs · PNG download करा · Card page उघडा

Lesson: 49.3 exec, attach and logs: get inside and read output

inspect, stats, top, port, diff, events. Debug करताना अंदाजापेक्षा facts चांगले.
उजळणी (Revision) card 4 of 11: inspect, stats, top, port, diff, events · PNG download करा · Card page उघडा

Lesson: 49.4 inspect, stats, top, port, diff and events

Restart policies. Apps crash होतात आणि servers reboot होतात.
उजळणी (Revision) card 5 of 11: Restart policies · PNG download करा · Card page उघडा

Lesson: 49.5 Restart policies

CPU आणि memory limits. एक leaky container बाकी सगळे apps पाडू शकतो.
उजळणी (Revision) card 6 of 11: CPU आणि memory limits · PNG download करा · Card page उघडा

Lesson: 49.6 Resource limits: memory, CPU, pids and IO

cp, commit, rename, update, wait. रोजच्या छोट्या कामांना छोटे commands.
उजळणी (Revision) card 7 of 11: cp, commit, rename, update, wait · PNG download करा · Card page उघडा

Lesson: 49.7 cp, commit, rename, update, wait and export

Container logging drivers. Unlimited logs disk भरू शकतात.
उजळणी (Revision) card 8 of 11: Container logging drivers · PNG download करा · Card page उघडा

Lesson: 49.8 Logging drivers and log rotation

प्रत्येक docker container command. On-call ला पटकन आठवणं वेळ वाचवतं.
उजळणी (Revision) card 9 of 11: प्रत्येक docker container command · PNG download करा · Card page उघडा

Lesson: 49.9 Every docker container command: full reference

PID 1, tini आणि graceful shutdown. SIGTERM ignore करणारे apps 10 seconds नंतर kill होतात आणि requests गमावतात.
उजळणी (Revision) card 10 of 11: PID 1, tini आणि graceful shutdown · PNG download करा · Card page उघडा

Lesson: 49.10 PID 1, tini (--init) and graceful SIGTERM shutdown

Container लगेच exit होतो; host पर्यंत पोहोचणं. Container फक्त main process चालू असेपर्यंत जगतो.
उजळणी (Revision) card 11 of 11: Container लगेच exit होतो; host पर्यंत पोहोचणं · PNG download करा · Card page उघडा

Lesson: 49.11 Container exits immediately, and reaching the host (host.docker.internal on Linux)

मुलाखत (Interview) cards

Container lifecycle समजवा. create बनवतो, start PID 1 चालवतो, stop SIGTERM आणि 10s नंतर SIGKILL, rm delete. run = create + start.
मुलाखत (Interview) card 1 of 11: Container lifecycle समजवा. · PNG download करा · Card page उघडा

Lesson: 49.1 Container lifecycle: created, running, paused, stopped, removed

Common docker run flags समजवा. -d background, --name, -p host:container, -e/--env-file, -v, --network, --restart, --rm, -it.
मुलाखत (Interview) card 2 of 11: Common docker run flags समजवा. · PNG download करा · Card page उघडा

Lesson: 49.2 docker run and its most important flags

exec vs attach? exec नवीन process चालवतो (exit सुरक्षित). attach PID 1 ला जोडतो; Ctrl+C ने container थांबू शकतो (Ctrl+P Ctrl+Q ने detach).
मुलाखत (Interview) card 3 of 11: exec vs attach? · PNG download करा · Card page उघडा

Lesson: 49.3 exec, attach and logs: get inside and read output

Container चा IP आणि memory कसा पाहता? IP साठी Go template सह docker inspect -f; CPU, memory साठी docker stats --no-stream.
मुलाखत (Interview) card 4 of 11: Container चा IP आणि memory कसा पाहता? · PNG download करा · Card page उघडा

Lesson: 49.4 inspect, stats, top, port, diff and events

always vs unless-stopped? दोन्ही crash आणि daemon start ला restart; unless-stopped docker stop नंतर बंदच राहतो, always daemon restart नंतर परत येतो.
मुलाखत (Interview) card 5 of 11: always vs unless-stopped? · PNG download करा · Card page उघडा

Lesson: 49.5 Restart policies

Memory limit गाठल्यावर काय होतं? Kernel तो OOM-kill करतो (exit 137, OOMKilled=true). CPU limits फक्त throttle करतात, kill नाही.
मुलाखत (Interview) card 6 of 11: Memory limit गाठल्यावर काय होतं? · PNG download करा · Card page उघडा

Lesson: 49.6 Resource limits: memory, CPU, pids and IO

Production मध्ये docker commit का नको? Commit केलेली image repeatable नाही: Dockerfile नाही, बदल लपलेले. फक्त debug state save करायला.
मुलाखत (Interview) card 7 of 11: Production मध्ये docker commit का नको? · PNG download करा · Card page उघडा

Lesson: 49.7 cp, commit, rename, update, wait and export

Container logs ने disk भरू नये म्हणून? --log-opt max-size=10m --log-opt max-file=3, किंवा daemon.json मध्ये default, किंवा local driver.
मुलाखत (Interview) card 8 of 11: Container logs ने disk भरू नये म्हणून? · PNG download करा · Card page उघडा

Lesson: 49.8 Logging drivers and log rotation

stop vs kill? stop SIGTERM पाठवून (default 10s) थांबतो, मग SIGKILL; kill लगेच SIGKILL (किंवा --signal).
मुलाखत (Interview) card 9 of 11: stop vs kill? · PNG download करा · Card page उघडा

Lesson: 49.9 Every docker container command: full reference

docker stop ला 10 seconds का लागतात? PID 1 ने SIGTERM handle केला नाही, म्हणून timeout नंतर Docker ने SIGKILL पाठवला.
मुलाखत (Interview) card 10 of 11: docker stop ला 10 seconds का लागतात? · PNG download करा · Card page उघडा

Lesson: 49.10 PID 1, tini (--init) and graceful SIGTERM shutdown

माझा container लगेच exit का होतो? त्याचा main process संपला किंवा crash झाला; docker logs आणि exit code पाहा.
मुलाखत (Interview) card 11 of 11: माझा container लगेच exit का होतो? · PNG download करा · Card page उघडा

Lesson: 49.11 Container exits immediately, and reaching the host (host.docker.internal on Linux)

तुलना (Comparison) cards

docker exec vs docker attach. exec: आत नवीन process.attach: main process ला जोडतो.
तुलना (Comparison) card 1 of 3: docker exec vs docker attach · PNG download करा · Card page उघडा

Lesson: 49.3 exec, attach and logs: get inside and read output

docker stop vs docker kill. stop: SIGTERM, वाट, मग SIGKILL.kill: लगेच SIGKILL.
तुलना (Comparison) card 2 of 3: docker stop vs docker kill · PNG download करा · Card page उघडा

Lesson: 49.9 Every docker container command: full reference

always vs unless-stopped. always: प्रत्येक वेळी restart.unless-stopped: तुम्ही थांबवलं नसेल तर restart.
तुलना (Comparison) card 3 of 3: always vs unless-stopped · PNG download करा · Card page उघडा

Lesson: 49.5 Restart policies