Docker images are needed to create and run a container. These are be pulled from remote docker repository or can also be created locally. Here are some handy commands to work with images.
-
Pull latest image of ubuntu or any other image
$ docker pull ubuntu
-
Pull tagged image of ubuntu (tag wiley) or any other image
$ docker pull ubuntu:wiley
-
Pull all tags of ubuntu image
$ docker pull --all-tags ubuntu
-
List docker images
$ docker images
-
Commit a container to an image
$ docker commit [container_id_or_name] image_id
-
Delete an image
$ docker rmi [images_id]