2015-06-07 23:07:20 -04:00
|
|
|
<!--[metadata]>
|
|
|
|
+++
|
|
|
|
draft = true
|
|
|
|
title = "Image"
|
|
|
|
description = "Definition of an image"
|
|
|
|
keywords = ["containers, lxc, concepts, explanation, image, container"]
|
|
|
|
[menu.main]
|
|
|
|
parent = "mn_reference"
|
|
|
|
+++
|
|
|
|
<![end-metadata]-->
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
# Image
|
|
|
|
|
|
|
|
## Introduction
|
|
|
|
|
2014-04-24 08:12:21 -04:00
|
|
|
![](/terms/images/docker-filesystems-debian.png)
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-12-15 23:25:37 -05:00
|
|
|
In Docker terminology, a read-only [*Layer*](/terms/layer/#layer) is
|
2014-04-15 20:53:12 -04:00
|
|
|
called an **image**. An image never changes.
|
|
|
|
|
2014-12-15 23:25:37 -05:00
|
|
|
Since Docker uses a [*Union File System*](/terms/layer/#union-file-system), the
|
2014-04-15 20:53:12 -04:00
|
|
|
processes think the whole file system is mounted read-write. But all the
|
|
|
|
changes go to the top-most writeable layer, and underneath, the original
|
2014-04-23 16:48:28 -04:00
|
|
|
file in the read-only image is unchanged. Since images don't change,
|
2014-04-15 20:53:12 -04:00
|
|
|
images do not have state.
|
|
|
|
|
2014-04-24 08:12:21 -04:00
|
|
|
![](/terms/images/docker-filesystems-debianrw.png)
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2015-04-21 11:50:09 -04:00
|
|
|
## Parent image
|
2014-04-15 20:53:12 -04:00
|
|
|
|
2014-04-24 08:12:21 -04:00
|
|
|
![](/terms/images/docker-filesystems-multilayer.png)
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
Each image may depend on one more image which forms the layer beneath
|
|
|
|
it. We sometimes say that the lower image is the **parent** of the upper
|
|
|
|
image.
|
|
|
|
|
2015-04-21 11:50:09 -04:00
|
|
|
## Base image
|
2014-04-15 20:53:12 -04:00
|
|
|
|
|
|
|
An image that has no parent is a **base image**.
|
|
|
|
|
|
|
|
## Image IDs
|
|
|
|
|
|
|
|
All images 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 command line. There is a small possibility
|
|
|
|
of short id collisions, so the docker server will always return the long
|
|
|
|
ID.
|