mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
c932667cd2
- Remove redundant chars and all errors caused by RST->MD conversion. e.g. [/#, /\, \<, />, etc.] - Fix broken inter-document links - Fix outbound links no-longer active or changed - Fix lists - Fix code blocks - Correct apostrophes - Replace redundant inline note marks for code with code marks - Fix broken image links - Remove non-functional title links - Correct broken cross-docs links - Improve readability Note: This PR does not try to fix/amend: - Grammatical errors - Lexical errors - Linguistic-logic errors etc. It just aims to fix main structural or conversion errors to serve as a base for further amendments that will cover others including but not limited to those mentioned above. Docker-DCO-1.1-Signed-off-by: O.S. Tezer <ostezer@gmail.com> (github: ostezer) Update: - Fix backtick issues Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
43 lines
1.7 KiB
Markdown
43 lines
1.7 KiB
Markdown
page_title: Container
|
|
page_description: Definitions of a container
|
|
page_keywords: containers, lxc, concepts, explanation, image, container
|
|
|
|
# Container
|
|
|
|
## Introduction
|
|
|
|
![](../../static_files/docker-filesystems-busyboxrw.png)
|
|
|
|
Once you start a process in Docker from an [*Image*](image.md), Docker fetches
|
|
the image and its [*Parent Image*](image.md), and repeats the process until it
|
|
reaches the [*Base Image*](image.md/#base-image-def). Then the
|
|
[*Union File System*](layer.md) adds a read-write layer on top. That read-write
|
|
layer, plus the information about its [*Parent Image*](image.md) and some
|
|
additional information like its unique id, networking configuration, and
|
|
resource limits is called a **container**.
|
|
|
|
## Container State
|
|
|
|
Containers can change, and so they have state. A container may be **running** or
|
|
**exited**.
|
|
|
|
When a container is running, the idea of a "container" also includes a
|
|
tree of processes running on the CPU, isolated from the other processes
|
|
running on the host.
|
|
|
|
When the container is exited, the state of the file system and its exit
|
|
value is preserved. You can start, stop, and restart a container. The
|
|
processes restart from scratch (their memory state is **not** preserved
|
|
in a container), but the file system is just as it was when the
|
|
container was stopped.
|
|
|
|
You can promote a container to an [*Image*](image.md) with `docker commit`.
|
|
Once a container is an image, you can use it as a parent for new containers.
|
|
|
|
## Container IDs
|
|
|
|
All containers are identified by a 64 hexadecimal digit string
|
|
(internally a 256bit value). To simplify their use, a short ID of the
|
|
first 12 characters can be used on the commandline. There is a small
|
|
possibility of short id collisions, so the docker server will always
|
|
return the long ID.
|