github.com/jandre/docker@v1.7.0/docs/terms/container.md (about)

     1  <!--[metadata]>
     2  +++
     3  draft = true
     4  title = "Container"
     5  description = "Definitions of a container"
     6  keywords = ["containers, lxc, concepts, explanation, image,  container"]
     7  [menu.main]
     8  parent = "mn_reference"
     9  +++
    10  <![end-metadata]-->
    11  
    12  # Container
    13  
    14  ## Introduction
    15  
    16  ![](/terms/images/docker-filesystems-busyboxrw.png)
    17  
    18  Once you start a process in Docker from an [*Image*](/terms/image), Docker
    19  fetches the image and its [*Parent Image*](/terms/image), and repeats the
    20  process until it reaches the [*Base Image*](/terms/image/#base-image-def). Then
    21  the [*Union File System*](/terms/layer) adds a read-write layer on top. That
    22  read-write layer, plus the information about its [*Parent
    23  Image*](/terms/image)
    24  and some additional information like its unique id, networking
    25  configuration, and resource limits is called a **container**.
    26  
    27  ## Container state
    28  
    29  Containers can change, and so they have state. A container may be
    30  **running** or **exited**.
    31  
    32  When a container is running, the idea of a "container" also includes a
    33  tree of processes running on the CPU, isolated from the other processes
    34  running on the host.
    35  
    36  When the container is exited, the state of the file system and its exit
    37  value is preserved. You can start, stop, and restart a container. The
    38  processes restart from scratch (their memory state is **not** preserved
    39  in a container), but the file system is just as it was when the
    40  container was stopped.
    41  
    42  You can promote a container to an [*Image*](/terms/image) with `docker commit`.
    43  Once a container is an image, you can use it as a parent for new containers.
    44  
    45  ## Container IDs
    46  
    47  All containers are identified by a 64 hexadecimal digit string
    48  (internally a 256bit value). To simplify their use, a short ID of the
    49  first 12 characters can be used on the command line. There is a small
    50  possibility of short id collisions, so the docker server will always
    51  return the long ID.