Tmp2: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Blanked the page)
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Image=


[[Docker Concepts#Container_Image]]
{{External|https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/}}
A ''container image'' is a ''read-only template'' consisting of one or more filesystem layers and metadata describing its needs and capabilities. Together they represent ''all'' the files required to run an application - the container image encapsulates all the dependencies of an application and configuration, and it can be deployed on any environment that has support for running containers. The same bundle can be assembled, tested and shipped to production without any change. Container images are a ''packaging technology''.
The image is produced by the [[docker build|build]] command, as the sole artifact of the build process. When an image needs to be rebuilt, every single layer after the first introduced change will need to be rebuilt. Each image has a [[#Tag|tag]].
Docker defines its own [[#Docker_Image_DSL|DSL]] (Domain Specific Language) for creating Docker images.
==Layer==
==Layered Image==
Each set of new changes made during the container build process is laid in top of previous changes. In general, each individual build step used to create the image corresponds to one filesystem layer. Each layer is identified by an unique long hexadecimal number named <span id='hash'></span>''hash''. The hash is usually shortened to 12 digits. If a shared image is updated, all containers that use it must be re-created.
The layers are [[#Docker_Revision_Control|version controlled]].
==Base Image==
Used by Dockerfile [[Dockerfile#FROM|FROM]].
==Image Registry==
{{External|Docker Registry https://docs.docker.com/registry/}}
A ''Docker registry'' is a service that is storing [[#Container_Image|Docker images]] and metadata about those images.
Examples:
* [[#Docker_Hub|Docker Hub]]
* https://quay.io
* https://cloud.google.com/container-registry/
* [[OpenShift_Concepts#Image_Registries|OpenShift image registry]]
The local Docker instance is configured with a number of registry it accesses, which can be listed with [[docker info]]:
docker info
...
Registry: https&#58;//registry.access.redhat.com/v1/
Insecure Registries:
  172.30.0.0/16
  127.0.0.0/8
Registries: registry.access.redhat.com (secure), registry.access.redhat.com (secure), docker.io (secure)
<font color=red>'''TODO''': how is a docker instance configured with specific registries?</font>
==Image Repository==
A ''Docker repository'' is a collection of different [[#Container_Image|Docker images]] with same name, that have different [[#Tag|tags]].
===Local Image Repository===
Docker caches images downloaded from remote repositories locally. The content of the local repository can be queried with [[Docker images#Overview|docker images]]. Images can be removed from the local repository with [[Docker rmi#Overview|docker rmi]].
==Tag==
Tag is alphanumeric identifier of the [[#Container_Image|images]] within a repository. It is a form of [[#Docker_Revision_Control|Docker revision control]]. Tags are needed because application develop over time, and a single image name can actually refer to many different versions of the same image.
An image is uniquely identified by its [[#hash|hash]] and possibly by one or several tags.
==Union Filesystem==
Docker uses a ''union filesystem'' to combine all [[#Layer|layers]] within an image into a single coherent filesystem.
==Docker Image DSL==
Docker defines its own Domain Specific Language (DSL) for creating Docker images.
{{External| https://docs.docker.com/engine/reference/builder/}}
==Docker Image Operations==
{{Internal|Docker_Client_Operations#Image_Operations|Docker Image Operations}}

Latest revision as of 07:02, 5 December 2017