From 9f5a44bd7d4ad7c2795586275f3182847a869b95 Mon Sep 17 00:00:00 2001 From: Andrew Roesener Date: Thu, 4 Jul 2019 11:00:52 -0700 Subject: [PATCH] Added docker-image guide directory/documentation (#30856) * Added docker-image folder and created index.md with documentation for basic docker image commands * corrected CLI link name from 'load' to 'image' --- guide/english/docker/docker-image/index.md | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 guide/english/docker/docker-image/index.md diff --git a/guide/english/docker/docker-image/index.md b/guide/english/docker/docker-image/index.md new file mode 100644 index 0000000000..0d63d63886 --- /dev/null +++ b/guide/english/docker/docker-image/index.md @@ -0,0 +1,40 @@ +--- +title: Docker image +--- + +## List docker images + +`docker image` command is for viewing and working with the docker images currently built/saved on the machine. + +To list final builds type the following command: + +``` +docker image ls +``` + +And for a list of all images, including intermediate containers type: + +``` +docker image ls -a +``` + +### Remove unused images + +If you wish to remove unused intermediate images you can clean up using the prune command: + +``` +docker image prune +``` + +In order to remove all unused images you can use the prune command with the -a flag applied. +To remove a specific image you can type the following: + +``` +docker image rm +``` + +This will remove the named image. +All removed images will have to pulled/built again prior to container redeployment. + +#### More Information: +- [Docker CLI docs: image](https://docs.docker.com/engine/reference/commandline/image/)