Docker Cheat sheet Series : Docker Image

Part 2

pradeep padmarajaiah
1 min readMay 22, 2018

docker image ls

List of images available

docker image history <image_name>

History of image being built

docker image build <DockerFile_Dir_name> -t <image_name>

Build a new docker image called image_name from the Dockerfile in the DockerFile_Dir_name

docker image save -o <filename_to_save_as_tar_or_zip> <image_name>

Export the image in to local physical system using save

docker image load -i <filename_to_save_as_tar_or_zip>

Import the image from local physical system to docker

docker image pull <image_name>

Pull the mentioned image from the docker hub

docker image push <image_name>

Push the mentioned image from the docker hub

docker image tag <image_name> <new_image_name>

change the image name by using tag name

docker image prune
Regain unused system resources by pruning images

docker rmi $(docker images -a -q)
Remove all the images

docker image prune — force — all
Regain unused system resources of pruning all the images which are not used by any one of the containers

--

--