Docker Images
Docker Images (DI) are like Classes for java, and defines a Docker Container.
DI is not one element but It is a set of (reusable) layers. Each layers is a service/program/OS/file.
For instance, when we pull an image we get a result like this:
giuseppefanuzzi@Giuseppes-MacBook-Pro ~ % docker pull mysql
Using default tag: latest
latest: Pulling from library/mysql
46ef68baacb7: Pull complete
94c1114b2e9c: Pull complete
ff05e3f38802: Pull complete
41cc3fcd9912: Pull complete
07bbc8bdf52a: Pull complete
6d88f83726a9: Pull complete
cf5c7d5d33f7: Pull complete
9db3175a2a66: Pull complete
feaedeb27fa9: Pull complete
cf91e7784414: Pull complete
b1770db1c329: Pull complete
Digest: sha256:15f069202c46cf861ce429423ae3f8dfa6423306fbf399eaef36094ce30dd75c
Status: Downloaded newer image for mysql:latest
docker.io/library/mysql:latest
DI are built in Layers. layers will receive an ID (SHA256)
Images ids are represented with SHA256 values derived based on his SHA256 layers.
DI are immutables, once built the files can’t be modified.
The hash value of an image is referred as “tag’ name.
When we pull an image normally we specify his name and sometimes his tag
For instance:
The REPOSITORY column represents the name.
The image tag name is the couple NAME:TAG.
For instance “hello-world:latest”