#
Docker image explanation
This tutorial explains to you what a Docker Image is. At the end of this article you will understand what a Docker image is.
If you want to create a Docker container on which you want to deploy something, you need to have a Docker image. A Docker image is a template used to create and launch a Docker container. A Docker image can contain a simple Linux installation or fully-configured enterprise software install, ready to run.
You can create a Docker image (Docker template) from another image (known as a base image). Also, you can create a Docker image from a Dockerfile or you create a Docker image from a Docker container.
If you have access to the Internet, you can download Docker images from the Docker Hub Repository.
Info
Because they can become quite large, images are designed to be composed of layers of other images, allowing a minimal amount of data to be sent when transferring images over the network.
In order to understand better how Docker is working, you can take a look at the article named What is Docker.
If you want to list Docker images you have into the local repository you have to use the docker images
comand.
Here it is the syntax of this command:
docker images [OPTIONS] [REPOSITORY[:TAG]]
Options:
--all , -a --> Show all images (default hides intermediate images)
--digests --> Show digests
--filter , -f --> Filter output based on conditions provided
--format --> Pretty-print images using a Go template
--no-trunc --> Don't truncate output
--quiet , -q --> Only show numeric IDs
Example:
Here are more commands related to Docker images:
docker image build
Build an image from a Dockerfiledocker image history
Show the history of an imagedocker image import
Import the contents from a tarball to create a filesystem imagedocker image inspect
Display detailed information on one or more imagesdocker image load
Load an image from a tar archive or STDINdocker image ls
List imagesdocker image prune
Remove unused imagesdocker image pull
Pull an image or a repository from a registrydocker image push
Push an image or a repository to a registrydocker image rm
Remove one or more imagesdocker image save
Save one or more images to a tar archive (streamed to STDOUT by default)docker image tag
Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
Enjoy working with Docker images and Docker containers !