Exploring Image layers
docker image ls
shows images stored, including version information using tagsdocker image rm
removes imagesdocker history <imagelD>
ordocker history image:tag
shows the different layers in the image- Notice that each modification adds an image layer!
Tagging Images
- Tags allow you to assign names to images, which makes it easier to manage versions
- If no tag is added, "latest" is used as the default tag
- Manually tag images:
docker tag myapache myapache:1.O
- Next, using
docker image ls | grep myapache
will show the same image listed twice, as 1.0 and as latest - Tags can also be used to identify the target registry
docker tag myapache localhost:5000/myapache:1.O