Chapter 49: Docker Containers: Lifecycle, docker run Flags, exec, logs, Restart Policies, Limits and Every Container Command
A container is the living process you get when you start an image. Today we do its whole life from birth to end with our own hands: the important docker run flags, logs, exec, restart policy and limits.
Container म्हणजे image चालू केल्यावर मिळणारी जिवंत process. आज तिचा जन्म ते मृत्यू, docker run चे सगळे महत्त्वाचे flag, logs, exec, restart policy आणि limit हे सगळं हाताने करूया.
Container यानी image चलाने पर मिलने वाली जीवित process. आज उसका जन्म से अंत तक, docker run के सारे ज़रूरी flag, logs, exec, restart policy और limit, यह सब हाथ से करेंगे.
What you will learn in this chapter
- The container lifecycle and exit codes
- Every important docker run flag
- exec, attach and logs
- inspect, stats, top, port, diff, events
- Restart policies and resource limits
- cp, commit, update, wait
- Logging drivers with rotation
- Every docker container command
All Docker commands in one place
Every docker command step by step on one running example (build, run, exec, logs, volumes, networks, Compose, cleanup) with a cheat sheet: All Docker Commands Step by Step with Examples
Concepts in this chapter
- 49.1Container lifecycle: created, running, paused, stopped, removed
- 49.2docker run and its most important flags
- 49.3exec, attach and logs: get inside and read output
- 49.4inspect, stats, top, port, diff and events
- 49.5Restart policies
- 49.6Resource limits: memory, CPU, pids and IO
- 49.7cp, commit, rename, update, wait and export
- 49.8Logging drivers and log rotation
- 49.9Every docker container command: full reference
- 49.10PID 1, tini (--init) and graceful SIGTERM shutdown
- 49.11Container exits immediately, and reaching the host (host.docker.internal on Linux)
The chapter recap is at the end of the last concept page.
Ravi Sir's Cards: 25 revision, interview and comparison cards for this chapter · मराठी cards